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
Amass of m 1.5 kg of steam is contained in a closed rigid container. initially the pressure and temperature of the steam are: p 1.5 mpa and t 240°c (superheated state), respectively. then the temperature drops to t2= 100°c as the result of heat transfer to the surroundings. determine: a) quality of the steam at the end of the process, b) heat transfer with the surroundings. for: p1.5 mpa and t 240°c: enthalpy of superheated vapour is 2900 kj/kg, specific volume of superheated vapour is 0. 1483 m/kg, while for t 100°c: enthalpy of saturated liquid water is 419kj/kg, specific volume of saturated liquid water is 0.001043m/kg, enthalpy of saturated vapour is 2676 kj/kg, specific volume of saturated vapour is 1.672 m/kg and pressure is 0.1 mpa.
Answers: 3
question
Engineering, 04.07.2019 18:10
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
question
Engineering, 04.07.2019 18:10
Ajournal bearing has a journal diameter of 3.250 in with a unilateral tolerance of 20.003 in. the bushing bore has a diameter of 3.256 in and a unilateral tolerance of 0.004 in. the bushing is 2.8 in long and supports a 700-lbf load. the journal speed is 900 rev/min. find the minimum oil film thickness and the maximum film pressure for both sae 20 and sae 20w-30 lubricants, for the tightest assembly if the operating film temperature is 160°f. a computer code is appropriate for solving this problem.
Answers: 3
question
Engineering, 04.07.2019 18:10
Compute the pressure drop of 30°c air flowing with a mean velocity of 8 m/s in a circular sheet-metal duct 300 mm in diameter and 15 m long. use a friction factor, f 0.02, and pair = 1.1644 kg/m a. 37.26 pa b. 25.27 pa n c. 29.34 pa d. 30.52 pa
Answers: 1
You know the right answer?
Add additional information to the student class below such as name, address, major, and contact info...
Questions
question
Mathematics, 19.11.2020 18:00
question
Mathematics, 19.11.2020 18:00
question
English, 19.11.2020 18:00
question
History, 19.11.2020 18:00
Questions on the website: 13722361