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, 03.07.2019 14:10
The y form of iron is known as: a) ferrite b) cementite c) perlite d) austenite
Answers: 3
question
Engineering, 04.07.2019 18:10
Apump is used to circulate hot water in a home heating system. water enters the well-insulated pump operating at steady state at a rate of 0.42 gal/min. the inlet pressure and temperature are 14.7 lbf/in.2, and 180°f, respectively; at the exit the pressure is 60 lbf/in.2 the pump requires 1/15 hp of power input. water can be modeled as an incompressible substance with constant density of 60.58 lb/ft3 and constant specific heat of 1 btu/lb or. neglecting kinetic and potential energy effects, determine the temperature change, in °r, as the water flows through the pump.
Answers: 1
question
Engineering, 04.07.2019 18:10
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:10
Afour cylinder four-stroke in-line engine has a stroke of 160mm, connecting rod length of 150mm, a reciprocating mass of 3kg and its firing order is 1-3-4-2. the spacing between cylinders is 100mm. i. show that the engine is in balance with regard to the primary inertia forces and primary 3. a and secondary inertia couples. li determine the out of balance secondary inertia force ii. propose ways of balancing this out of balance force and discuss the challenges that will arise
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, 13.04.2020 18:09
question
Mathematics, 13.04.2020 18:10
question
Mathematics, 13.04.2020 18:10
Questions on the website: 13722361