public class BookstoreCredit {     public static void main (String args[]) {         // Write your code here     }     public static void computeDiscount(String name, double gpa) {         // Write your code here     }

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Java: 

import java.util.Scanner;
public class BookstoreCredit {
    public static void main (String args[]) {
        // Write your code here
    }

    public static void computeDiscount(String name, double gpa) {
        // Write your code here
    }
Instructions
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.0 credit.
Create an application that prompts a student for a name and grade point average, and then
passes the values to a method ( computeDiscount) that displays a descriptive message. The
message uses the student's name, echoes the grade point average, and computes and displays
the credit.
An example of the program is shown below.
Enter your name >> John
Enter your gpa >>3.4
John, your GPA is 3.4, so your credit is $34.0
Transcribed Image Text:Instructions 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.0 credit. Create an application that prompts a student for a name and grade point average, and then passes the values to a method ( computeDiscount) that displays a descriptive message. The message uses the student's name, echoes the grade point average, and computes and displays the credit. An example of the program is shown below. Enter your name >> John Enter your gpa >>3.4 John, your GPA is 3.4, so your credit is $34.0
import java.util.Scanner;
public class BookstoreCredit {
public static void main (String args[]) {
// Write your code here
}
public static void computeDiscount (String name, double gpa) {
// Write your code here
}
Transcribed Image Text:import java.util.Scanner; public class BookstoreCredit { public static void main (String args[]) { // Write your code here } public static void computeDiscount (String name, double gpa) { // Write your code here }
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning