Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tasks Create a new Project (Lab5). 1) Task: Practice with if statements (8 pts) a) Create a new package task1 and a new class in

image text in transcribed

Tasks Create a new Project (Lab5). 1) Task: Practice with if statements (8 pts) a) Create a new package "task1" and a new class in that package "GradeMaker". Add the empty "main" method in your class o main: In the "main" method, create a Scanner object to read user keyboard input. Prompt the user to enter a grade value between 0.0 and 100.0 If the grade entered is NOT between 0.0 and 100.0 print an error message and return from "main" -just use return; Call a method called "calcGrade" (we'll write that method shortly) and pass the score the user entered as the parameter. This method should return a string so be sure to save the returned value. Print the returned value as follows (showing an example grade value): Grade: A o calcGrade Create a method "calcGrade" that accepts one parameter a score value. Create a string variable to hold the letter grade, leave it unassigned for now. Create an it/else if...else statement to support the following letter grade scheme 90.0-100.0 A 80.0-90.0 (do not include the end-point value here) B .70.0-80.0 (do not include the end-point value here) C 60.0 70.0 (do not include the end-point value here)D Otherwise, the grade is F. Return the letter grade from your function

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_2

Step: 3

blur-text-image_3

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

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions

Question

3. What may be the goal of the team?

Answered: 1 week ago

Question

Is how things are said consistent with what is said?

Answered: 1 week ago