Complete the following code in the blanks to add the instructions on the comments class ContactInfo { private String homeAddress; private String emailAddress; private int telephoneNumber; } public class Student { private String name; private int age; private int grade; // add an aggregation relationship between class student and Contact Info ----------------------------------------------------------------------- // add a method called study and print out “Study Hard” -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- } }
Complete the following code in the blanks to add the instructions on the comments
class ContactInfo {
private String homeAddress;
private String emailAddress;
private int telephoneNumber;
}
public class Student {
private String name;
private int age;
private int grade;
// add an aggregation relationship between class student and Contact Info
-----------------------------------------------------------------------
// add a method called study and print out “Study Hard”
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
}
}
Step by step
Solved in 2 steps