Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you do question 1? Ada, whose student ID is 12345, is studying 4th year at the CENG department with scholarship. Ada has a GPA

Can you do question 1? image text in transcribed
image text in transcribed
image text in transcribed
Ada, whose student ID is 12345, is studying 4th year at the "CENG" department with scholarship. Ada has a GPA of 3.7. This student may get 3960.0 TL as salary in Turkey. Enter information of second student: Student ID: 54321 Name: Eda Years of study: 2 GPA: 2,54 Scholarship (Yes/No): No Eda, whose student ID is 54321, is studying 2nd year at the "ECON" department without scholarship. Eda has a GPA of 2.54. This student may get 23200.0 TL as salary abroad. - 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". Also notice that years of study should be written as 1 st, 2 nd, 3rd or 4 th.) Ada, whose student ID is 12345, is studying 4th year at the "CENG" department with scholarship. Ada has a GPA of 3.7. Question 2 Write a class called StudentTest.java using main method. - Create two Student objects with departments CENG and ECON, respectively. - Set features of the first student as follows: Student ID: 12345 Name: Ada Years of study: 4 GPA: 3.7 Scholarship (Yes/No): Yes - Print information of the first student by using printlnformation method. - Predict future salary of the student by using predictFutureSalary method if (s)he works in Turkey. - Read information of the second student by using readinformation method. - Print information of the second student by using printinformation method. - Predict future salary of the student by using predictFutureSalary method if (s)he works abroad. 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. - has Scholarship is a boolean value indicating if the student has scholarship or not. Methods: - readinformation reads user inputs as in the sample output given below and assigns them to related variables. \begin{tabular}{l} Student ID: 12345 \\ Name: Ada \\ Years of study: 4 \\ GPA: 3,7 \\ Scholarship (Yes/No): Yes \\ \hline \end{tabular} - predictFutureSalary 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 3960.0TL as salary in Turkey. TurkeySalary=(GPA1000)(yearsOfStudy10) Also, add 300 to this amount if the student has scholarship. AbroadSalary=(GPA10000)(yearsOfStudy100)

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

MFDBS 91 3rd Symposium On Mathematical Fundamentals Of Database And Knowledge Base Systems Rostock Germany May 6 9 1991

Authors: Bernhard Thalheim ,Janos Demetrovics ,Hans-Detlef Gerhardt

1991st Edition

3540540091, 978-3540540090

More Books

Students also viewed these Databases questions