Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

Explain the importance of nonverbal messages.

Answered: 1 week ago

Question

Describe the advantages of effective listening.

Answered: 1 week ago

Question

Prepare an employment application.

Answered: 1 week ago