Question: Write a class called Student.java with the following variables and methods. Variables: department is a string value indicating department of the student studentID is a

 Write a class called Student.java with the following variables and methods.Variables: department is a string value indicating department of the student studentID

Write a class called Student.java with the following variables and methods. Variables: department is a string value indicating department of the student studentID is a string value indicating ID of the student. name is a string value indicating name of the student. yearsOfStudy is an integer value indicating how many years the student has studied at the university. gpa is a double value indicating gpa of the student. Methods: readinformation reads user inputs as in the sample output given below and assigns them to related variables. Student ID: 54321 Name: Ali Years of study: 1 GPA: 3.7 Scholarship (Yes/No): Yes predictFuture Salary gets an integer value (1 for working in Turkey or 2 for working abroad) as parameter and predicts future salary of the student according to the equations and it prints the result as in sample output given below. (You should write either in Turkey or "abroad" at the end of the sentence according to provided parameter.) This student may get 6830.0 TL as salary in Turkey. TurkeySalary = (GPA +500) - (yearsOfStudy #20) Also, add 5000 to this amount if the student is studying in CENG department. AbroadSalary = (GPA-5000) - (yearsOf Study +500) Also, subtract 2000 from this amount if the student is studying in ECON department. printinformation prints information as given in the sample output below. (If the student has scholarship, you should write "with scholarship", otherwise you should write "without scholarship".) Ali, whose student ID is 54321, is studying 1st year at the "CENG" department Ali has a GPA of 3.7. areStudentsEqual gets one Student object as parameter and compares two students in terms of their studentID, name, yearsOfStudy, GPA variables. Finally, it returns a boolean value indicating whether all are same or not

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!