No. 4 a) Create a class named Student. A Student has fields for an ID number, number of credit hours earned, and number of points earned. (For example, for every 1 unit a student earns 5 points)....


No. 4<br>a) Create a class named Student. A Student has fields<br>for an ID number, number of credit hours earned, and<br>number of points earned. (For example, for every 1<br>unit a student earns 5 points). Include methods to<br>assign values to all fields. A Student also has a field<br>for grade point average. Include a method to compute<br>the grade point average field by dividing points by<br>credit hours earned.<br>Write methods to display the values in each Student<br>field. Save this class as Student.java.<br>b) Write<br>instantiates a Student object from the class you<br>created and assign values to its fields. Compute<br>the Student grade point average, and then display<br>a<br>class<br>named<br>ShowStudent<br>that<br>all the values associated with the Student. Save<br>the application as ShowStudent.java.<br>c) Create a constructor for the Student class you<br>created. The constructor should initialize each<br>Student's ID number to 9999, his or her points<br>earned to 15, and credit hours to 3 (resulting in a<br>grade point average of 3.0). Write a program that<br>demonstrates that the constructor works by<br>instantiating an object and displaying the initial<br>values.<br>Save<br>the<br>application<br>as<br>ShowStudent2.java.<br>

Extracted text: No. 4 a) Create a class named Student. A Student has fields for an ID number, number of credit hours earned, and number of points earned. (For example, for every 1 unit a student earns 5 points). Include methods to assign values to all fields. A Student also has a field for grade point average. Include a method to compute the grade point average field by dividing points by credit hours earned. Write methods to display the values in each Student field. Save this class as Student.java. b) Write instantiates a Student object from the class you created and assign values to its fields. Compute the Student grade point average, and then display a class named ShowStudent that all the values associated with the Student. Save the application as ShowStudent.java. c) Create a constructor for the Student class you created. The constructor should initialize each Student's ID number to 9999, his or her points earned to 15, and credit hours to 3 (resulting in a grade point average of 3.0). Write a program that demonstrates that the constructor works by instantiating an object and displaying the initial values. Save the application as ShowStudent2.java.

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here