subject

To encourage good grades, Hermosa High School has decided to award each student a bookstore credit that is 10 times the student’s grade point average. In other words, a student with a 3.2 grade point average receives a $32 credit. Create a class that prompts a student for a name and grade point average, and then passes the values to a method that displays a descriptive message. The message uses the student’s name, echoes the grade point average, and computes and displays the credit. Save the application as BookstoreCredit. java.

Must use the following code and variables:

import java. util. Scanner; //import statement allow use of Scanner class

public class BookstoreCredit
{
public static void main(String[] args)
{
//Add variables (student name, student gap and bookstore credit)
String studentName;
double studentGpa; //double declaration for student gpa (hold numbers)pg.71-72
double bookstoreCredit; //double declaration for bookstore credit (hold numbers)pg.71-72

//insert a Scanner class object declaration - pg.84 You Do It #4
//add missing scanner class here

//Add prompt for the integer value and an input statement that accepts the value pg.80
//add missing statement here

studentName = input. nextLine(); //retrieves the next line of data and returns it as a String pg.79

//Add prompt for the integer value and an input statement that accepts the value pg.80
//add missing statement here

studentGpa = input. nextDouble(); //retrieves input as a double pg.79

//bookstore credit is 10 times the student gpa
bookstoreCredit = studentGpa * 10;

//Output statement displays student’s name, echoes the grade point average, and computes and displays the credit pg.80
System. out. println(studentName + ", with a " + studentGpa + " GPA you receive a $" + bookstoreCredit + "credit!");

}

}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead która śledzi lee w 4 epizodzie
Answers: 1
question
Computers and Technology, 25.06.2019 02:00
Lisa is making a presentation for her project and she wants to use the logo of her company in her presentation. which element would she use to make her logo stand out in her presentation? a. gradation b. contrast c. alignment d. balance
Answers: 1
question
Computers and Technology, 25.06.2019 06:20
In your pest busters game, how does player 2 move the ship 2 object? a pressing the w and s keys b. pressing the up arrow and down arrow keys c. moving the mouse from side to side d. moving the mouse up and down select the best answer from the choices provided
Answers: 1
You know the right answer?
To encourage good grades, Hermosa High School has decided to award each student a bookstore credit t...
Questions
question
Mathematics, 08.05.2021 01:00
question
Physics, 08.05.2021 01:00
question
Chemistry, 08.05.2021 01:00
question
Mathematics, 08.05.2021 01:00