subject
Engineering, 25.02.2020 18:02 treypickich14

Add additional information to the student class below such as name, address, major, and contact information along with all the getters and setters (methods) needed to access all data. Submit your code along with a sample run of your program. Comment all your code. Cite any sources of information you use. Write a note on the process of completing the assignment in a Microsoft Word document. // ShowStudent. java // client to test the Student class class ShowStudent { public static void main (String args[]) { Student pupil = new Student(); // We need a new student named pupil pupil. setIDnumber(234); // We are setting pupil's ID number to 234 pupil. setPoints(47); // We are setting pupil's points to 47 pupil. setHours(15); // We are setting pupil's hours to 15 pupil. showIDnumber(); // We are showing pupil's ID number pupil. showPoints(); // We are showing pupil's points pupil. showHours(); // We are showing pupil's hourse System. out. println("The grade point average is " + pupil. getGradePoint()); // we are calculating pupil's GPA } } class Student // this is the student class { // the private data members private int idNumber; private int hours; private int points; // Constructor creates a new student Student() { idNumber = 9999; // a max ID points = 12; // starting out assuming 12 points hours = 3; // starting out assuming 3 hours } // end of constructor // the public get and set methods fro pulil specific information public void setIDnumber(int number) // pass in a number { idNumber = number; // assign the number } public int getIDnumber() // return a student ID { return idNumber; } public void setHours(int number) // pass in a number { hours = number; // assign the number to hours } public int getHours() // return the student's hours { return hours; } public void setPoints(int number) // pass in a number { points = number; // assign number to points } public int getPoints() // return the points { return points; } // methods to display the fields public void showIDnumber() { System. out. println("ID Number is: " + idNumber); } public void showHours() { System. out. println("Credit Hours: " + hours); } public void showPoints() { System. out. println("Points Earned: " + points); } public double getGradePoint() // calculate the GPA with internal data { return (points * 1.0 / hours); // simple integer division will truncate the decimal places } }

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:10
If a particle moves along a path such that r : (3 sin t) m and ? : 2t rad, where t is in seconds. what is the particle's acceleration in m/s in 4 seconds? a)- 16.43 b)- 16.29 c)- 15.21 d)- 13.79
Answers: 1
question
Engineering, 04.07.2019 18:10
Which one from below is not one of the reasons of planning failures? (clo3) a)-planner is careless. b-planner spend less time in the field but more time on the desk c)-planner is not qualified d)-planner does not have sufficient time to properly plan
Answers: 3
question
Engineering, 04.07.2019 19:10
Asteam is contained in a rigid tank with a volume of 1 m3. initially, the pressure and temperature are 7 bar and 500 oc, respectively. the temperature drops due to cooling process. determine: (1) the temperature at which condensation begins in °c, (2) the fraction of the total mass that has condensed when the pressure decreased to 0.5 bar. (3) the volume in m3 occupied by saturated liquid at the final state?
Answers: 3
You know the right answer?
Add additional information to the student class below such as name, address, major, and contact info...
Questions
question
Mathematics, 04.02.2020 07:55
question
Social Studies, 04.02.2020 07:55