subject

In this exercise, you are going to use the Person and Student classes to create two objects, then print out all of the available information from each object. Your tasks Create a Person object with the following information: Name: Thomas Edison Birthday: February 11, 1847 Create a Student object with the following infromation: Name: Albert Einstein Birthday: March 14, 1879 Grade: 12 GPA: 5.0 You do not need to modify the Person or Student class. public class PersonRunner
{
public static void main(String[] args)
{
// Start here!
}
}
public class Person {
private String name;
private String birthday;
public Person (String name, String birthday)
{
this. name = name;
this. birthday = birthday;
}
public String getBirthday(){
return birthday;
}
public String getName(){
return name;
}
}
public class Student extends Person {
private int grade;
private double gpa;
public Student(String name, String birthday, int grade, double gpa){
super(name, birthday);
this. grade = grade;
this. gpa = gpa;
}
public int getGrade(){
return grade;
}
public double getGpa(){
return gpa;
}
}

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, stodd9503
Awell-diversified portfolio needs about 20-25 stocks from different categories is this true or false?
Answers: 2
image
Computers and Technology, 22.06.2019 15:30, tfornwalt4390
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
image
Computers and Technology, 22.06.2019 19:20, mahaleyrenee1195
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
image
Computers and Technology, 23.06.2019 10:00, austintules2005
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
You know the right answer?
In this exercise, you are going to use the Person and Student classes to create two objects, then pr...

Questions in other subjects:

Konu
Mathematics, 25.03.2020 18:45
Konu
Mathematics, 25.03.2020 18:45
Konu
Mathematics, 25.03.2020 18:46