Skip to main content

Posts

Showing posts with the label Day 12: Inheritance Hackerrank Solution in Java

Day 12: Inheritance Hackerrank Solution Java

 Day 12: Inheritance Hackerrank Solution Java For Explanation: Sample Input Heraldo Memelli 8135627 2 100 80 Sample Output Name: Memelli, Heraldo ID: 8135627 Grade: O Code: import  java.util.*; class  Person {      protected  String firstName;      protected  String lastName;      protected   int  idNumber;           // Constructor     Person(String firstName, String lastName,  int  identification){          this .firstName = firstName;          this .lastName = lastName;          this .idNumber = identification;     }           // Print person data   ...