(Solved): Define A Class Named Student. A Student Object Represents A University Student That, For Simplicity ...
Define a class named Student. A Student object represents a university student that, for simplicity just has a name, ID number, and number of units earned towards graduation. Each Student object should have the following public behavior: • new Student (name, id) Constructor that initializes a new Student object storing the given name and ID number, with units . 8. getName() s.getId() 8.getUnits() Returns the name, ID, or unit count of the student, respectively . .incrementUnits(units): Adds the given number of units to this student's unit count. . .hasEnoughUnits() Returns whether the student has enough units (180) to graduate. . s.toString() Returns the student's string representation, e. "Nick (#42342)".
Expert Answer
public class Student { private String name; private String iD; private double units; public Student(String name, String iD) { this(name,iD,0); } public Student(String name,String iD,double units)