Question: Homework 1: Object Oriented Programming (OOP) java language Requirement 1 Define a student class. A student has the following attributes: Firstname: the name of the

Homework 1: Object Oriented Programming (OOP) java language

Requirement 1 Define a student class. A student has the following attributes: Firstname: the name of the student lastname: the name of the family Gender: which can be male or female status: which can be equal to freshman, sophomore, junior, and senior gpa. The average which value is between 0.0 to 4.0

Then define the following methods for the student class. The show_myself: method will simply print all the attribute variables when called upon the object. This method has no input arguments. The study_time: method will increment the gpa of the student according to the following formula: ` gpa = gpa + log(study_time)`. The only input argument of this method is the variable study_time. In addition make sure that the gpa variable never exceeds 4.0 even if the student studies for a very long time. Any necessary methods that is required for such class.

Requirement 2

Define a system that accepts information about finite number of students from a text file and then using the show-myself method to print out the information about the student. In order to do that you need to use the loops The information about students must be input using a text file name "student.txt" and here is a sample for its contents Karina, Manasra, F, Junior , 3.1 HW1 Friday, March 12, 2021 10:28 PM

HWs Page 1

Karina, Manasra, F, Junior , 3.1 Ahmad, Subhi, M, sophomore, 3.5 Mai, Shabanah, Senior , 3.56 Alaa , Abu Madi, sophomore, 2.5 Ruba, Titi, senior, 4.0 Requirement 3

Use your objects from above and let the system asks you to enter the study time of each student and then update the GPA for each student. It is a good idea to have the input of the study time to be from a text file named "Stime.txt" The system should print all the students in ascending order by the GPA

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!