answer.
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
koban
2 months 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:
amid [951]2 months ago
7 0

Answer:

// here's the Java code.

import java.util.*;

// definition of the class

class BookstoreCredit

{

/* method that prints a message including the name and grade point */

   public static void fun(String name,double grade)

   {

// multiplying grade by 10

       grade=grade*10;

// display the message

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

   }

// main method for the class

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

{

   try{

    // scanner instance to read input

       Scanner s=new Scanner(System.in);

        // declaring 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:

Define a string variable named s_name and a double variable named grade. Obtain the name and grade from the user, then invoke the fun() method with these parameters, which will multiply the grade by 10 and output a message that includes the student's name along with their average grade.

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
Write an if-else statement with multiple branches. If givenYear is 2101 or greater, print "Distant future" (without quotes). Els
Natasha_Volkova [1026]
Here's a C code snippet: #include <stdio.h> int main() { int year; printf("enter year:"); scanf("%d",&year); if(year>=2101) { printf("Distant future"); } else if(year>=2001&&year<=2100) { printf("21st century"); } else if(year>=1901&&year<=2000) { printf("20th century"); } else if(year<=1900) { printf("Long ago"); } return 0;} Output: enter year:2018 21st century. </stdio.h>
7 0
1 month ago
Read 2 more answers
Which is among the earliest formats of audio used in video games? A. MP3 B. wave table synthesis C. pulse code modulation D. MOD
Harlamova29_29 [1022]

Answer:

MOD

Explanation:

The MOD audio file format is primarily designed to represent musical content. It employs the.MOD file extension and is notably recognized as background music in various independent video games. It can be said that MOD audio file types are among the most widely used trackers in numerous computer games and demos.

0 0
2 months ago
Read 2 more answers
Question #5<br> How does the computer decide which path to follow in a selection control structure?
Harlamova29_29 [1022]

Answer:

In my opinion, the coding structure's elements assist the software or CPU in interpreting or directing the programming.

Explanation:

6 0
2 months ago
You want to register the domain name ABCcompany.org, but the registration service is not allowing you to do that. What's the mos
amid [951]

Options :

The domain name is already taken.

Domain names are required to end with ".com".

You do not hold legal ownership of ABC Company.

Domain names must exclusively use lowercase letters.

Answer:

The domain name is already taken.

Explanation: In the above scenario, ABCcompany.org signifies the domain associated with a specific individual or organization that leads to the owner's website. Each domain name must be unique; therefore, no two different entities or individuals can have identical domain names. Domains can have endings like .com, .org, .ng, and more, and they are not case-sensitive. Thus, the inability to register the mentioned domain is probably because it has already been claimed by someone else.

6 0
3 months ago
Compute the approximate acceleration of gravity for an object above the earth's surface, assigning accel gravity with the result
maria [1035]

Response:

Written in Python

G = 6.673 *pow(10,-11)

M = 5.98 *pow(10,24)

d = float(input("Enter distance: "))

g = (G * M)/(pow(d,2))

print("Calculated gravity acceleration: "+str(g))

Explanation:

The following line sets the gravitational constant

G = 6.673 *pow(10,-11)

This line establishes the mass of the Earth

M = 5.98 *pow(10,24)

This prompts the user to input the object's distance

d = float(input("Enter distance: "))

This calculates the gravity exerted on the object

g = (G * M)/(pow(d,2))

This line outputs the gravity acceleration without rounding

print("Calculated gravity acceleration: "+str(g))

8 0
3 months ago
Other questions:
  • Create a conditional expression that evaluates to string "negative" if user_val is less than 0, and "non-negative" otherwise.
    6·1 answer
  • Tag groups can be nested up to ____ levels deep, with up to _______ tag subgroups under a single parent.
    14·1 answer
  • Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
    10·1 answer
  • A wireless network was recently installed in a coffee shop and customer mobile devices are not receiving network configuration i
    12·1 answer
  • Define a function PrintFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand.
    9·1 answer
  • What problem does the DNS solve? How does the DNS help the world wide web scale so that billions of users can access billions of
    11·1 answer
  • JAVA Write a program that first asks the user to type a letter grade and then translates the letter grade into a number grade. L
    9·1 answer
  • Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times
    8·1 answer
  • On January 1, 1980, Moises deposited $1850 into a savings account paying 5.6% interest, compounded quarterly. If he hasn't made
    9·2 answers
  • Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!