1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vika [28.1K]
4 years ago
11

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.
Computers and Technology
1 answer:
Ad libitum [116K]4 years ago
7 0

Answer:

// here is code in java.

import java.util.*;

// class definition

class BookstoreCredit

{

/* method that display descriptive message with name and grade point */

   public static void fun(String name,double grade)

   {

// multiply grade with 10

       grade=grade*10;

// print the message

       System.out.println(name+"\'s average grade is $"+grade);

   }

// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // scanner object to read innput

       Scanner s=new Scanner(System.in);

        // variables

      String s_name;

      double grade;

      System.out.print("Please enter the name:");

      s_name=s.nextLine();

      System.out.print("Please enter the grade point:");

      grade=s.nextDouble();

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create variable s_name of string type and grade of double type.Read the student name and grade from user.call the fun() with these two parameter, where grade is multiplied by 10 and print the descriptive message which has student name and echoes the grade point average.

Output:

Please enter the name:john

Please enter the grade point:3.2

john's average grade is $32.0

You might be interested in
 Formulas within table cells always begin with
Delicious77 [7]
(D) I don't know about other spread sheet software, but in Microsoft Excel, a formula is always entered beginning with an 'equals' sign. ( = ).
4 0
3 years ago
Write a program that accepts a whole number as input, multiplies that number by 12, and then outputs the product.
lesya692 [45]

try:

   num = int(input("Enter a number: "))

   print(12*num)

except ValueError:

   print("Please enter a number!")

I wrote my code in python 3.8

6 0
3 years ago
Read 2 more answers
You are part of which sphere of Earth?
Elden [556K]
We are on the lithosphere
4 0
3 years ago
Read 2 more answers
Procter & Gamble uses an intranet called InnovationNet to help people working on similar problems share ideas and expertise.
Aleks04 [339]

<em>The answer is Core Competencies. </em>

<em> </em>

<em>Core competency is a management theory which focuses on team works by different divisions or department in an organization. It focuses on activities, programs, software and anything that would make people in the company working together to achieve company's missions more effectively. </em>

<em />

6 0
3 years ago
Many common web page designs use columns that are about ____ of the width of the page to approximate traditional aesthetic propo
Rom4ik [11]
<span>Many common web page designs use columns that are about a third of the width of the page to approximate traditional aesthetic proportions.</span>
8 0
4 years ago
Other questions:
  • ​​most code division multiple access (cdma) networks conform to ____________ , created by the telecommunications industry associ
    10·1 answer
  • Your boss wants to utilize some sort of cloud storage for his files so that all of his
    10·2 answers
  • g Write a program that prompts the user for an integer n between 1 and 100. If the number is outside the range, it prints an err
    5·1 answer
  • Write a method max() which take a generic singly linked list as an argument and returns the maximum element reference in the lis
    10·1 answer
  • &gt;&gt;&gt; from hog import *
    15·1 answer
  • Distinguish between exponentiation and modulus. Be specific.
    5·1 answer
  • 1. Who was able to complete the puzzle the fastest in Trial 1?
    15·1 answer
  • List 10 ways how can graphic design help the community
    13·1 answer
  • after landing, you are tying down the aircraft when a person approaches and asks: "faa. are you the pilot of this aircraft?" wha
    11·1 answer
  • To stored three characters a computer occupies. Bytes memory space
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!