Question: Write Java program Write Java program and following the Questions below: Develop a Java program that includes the following: (a) An interface GrdauteStudent that includes
Develop a Java program that includes the following: (a) An interface GrdauteStudent that includes a method: getStatus(), which has no argument and returns false if Gpa strictly below 2, otherwise it returns true. [2 marks] (b) A public class Student that: [7 marks] has two private instance variable: int id and String name. has a two-argument constructor that sets instance variables to given values. has a zero-argument constructor that sets the values of its instance variables to its default values. It should invoke the two-argument constructor. has a setter and getter method for name attribute. (c) A public class ItStudent that: (12 marks] inherits the Student class and implements the Studentstatus interface. has two private instance variables: String major, double gpa. has a four-argument constructor that sets the value of its attributes to given values. It should invoke its super class constructor. has a method calcGPA, receive as argument a newgrade which calculates and returns a new GPA. Hint: gpa = gpa+111.0/ newgrade. overrides the Object's toString() method in order to return a string representation of the triangle attributes as the below format. Name= ID = , Major = Hint: Implement any necessary methods. Gpa = (d) Draw the class diagram of the above classes and interface. [4 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
