Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use java 1. Create a new class (Student) with the following attributes name (String): the name of a student score (int): the score of a

image text in transcribed

image text in transcribed

image text in transcribed

use java

1. Create a new class (Student) with the following attributes name (String): the name of a student score (int): the score of a student Both attributes can be public. 2. In your Student class, add a getGrade() method which returns the grade of the student based on its score attribute. Score Grade From 90 to 100 From 70 to 89 B From 50 to 69 Lower than 50 F Then, create a new main class program (StudentGrade2) to do the following: 3. In your StudentGrade2 class, create a new array for holding up to five Students object. 4. Display the message "Please enter the names and scores of the five students". 5. Accept the name and score of each student one by one, separated by space or newline. The scores are integer, and the names are alphabetical. 6. For each student record entered, create a new Student object to store the 3 your array. 7. After all data have been entered, print out a grade report as follows: ***** Grade Report ***** Name1, Score1, Grade1 Name2, Score2, Grade2 Name3, Score3, Grade3 Name4, Score4, Grade4 Name5, Score5, Grade5 End of Report ***** Hints: use a for loop to retrieve the five student objects from the array one by one. For each object, use the getGrade() function of each student object to compute the grade, then print out the details of that student

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

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

What are Electrophoresis?

Answered: 1 week ago