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 R 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
Q: Write a class that prompts the user for the day’s high and low temperatures. If the high is greater…
A: Step 1:- Note:-I am writing the program in the java language Program Approach:- Import the…
Q: This method simulates the playing of one round of “Rock Paper Scissors”. In this strange version of…
A: Below is the required program: - Approach: - Import the package to use the Scanner class and define…
Q: and changing the account detains of some banks, to stop this practice, you have been tasked to…
A: Algorithm: Start Create class Abaaneke with attributes name, deposit, oldBalance, newBalance…
Q: Create a class to print the area of a square and a rectangle. The class has two methods with the…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: 8. Create a new method that takes two integer values (current month, birth month) as parameters and…
A: Please refer below code and screenshot: function check(current_mon,birth_mon){ val=0;…
Q: This method simulates the playing of one round of “Rock Paper Scissors”. In this strange version of…
A: Below is the complete Java program: - Approach: - Import the package to use the Scanner class and…
Q: Referring to the previous DecimalFormatting class, there were three lines of code. static…
A: DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers. The hierarchy is:…
Q: A test will input numbers so no user input is required. An integer will be input. Take that value…
A: Given :- A test will input numbers so no user input is required. An integer will be input. Take that…
Q: Following the example of the Rectangle class of Chapter 9 Exercise 1, design a class named Cuboid to…
A: PROGRAM INTRODUCTION: Define the class with the name cuboid. Declare the required constructor that…
Q: public class BackAccount { public double Balance { set; get; } public void Deposit(double amount) {…
A: //****************************************************************************** // File:…
Q: To encourage good grades, Hermosa High School has decided to award each student a bookstore credit…
A: writing code in java import java.util.*; class CreditBookstore { public static void fun(String…
Q: Consider a class Time that represents a time of day. It has attributes for the hour and minute. The…
A: Consider a class Time that represents a time of day. It has attributes for thehour and minute. The…
Q: 3) Write a class called Point that represents a point in 2D plane. The constructor accepts the x and…
A: As I have read the guidelines I can provide answers to only 1 part of the questions in case of…
Q: Suppose there is a class named Book having an attribute named price , a default constructor and…
A: Note : Here I have included the class Book with constructor and setPrice method for your ease of…
Q: Starting with your solution to the previous task, add the following methods to your Circle class to…
A: As the previous Circle class is not provided , I will consider it still i have implemented the init…
Q: I would like you to create a program that keeps track of the inventory (by make - e.g., Toyota) of…
A: In cases where there are multiple parts, we must answer first 3. Parts 1,2 and 3 have been…
Q: Modify a class named Circle with fields named radius, diameter, and area. Include a constructor that…
A: the code is an given below : Circle.java class Circle{double radius,diameter,area;…
Q: The following methods should output simple text messages on the screen for feedback, when…
A: As the student only asked about the plane class. Im Providing the Plane Class in Java Program below:
Q: . Carly's Catering provides meals for parties and special events. In Chapters 3 and 4, you created…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: in java, Write a class that represents a student. Every student has a name, an id number, a number…
A: Program: import java.util.*; class student { // Declare variables String name; int id; double…
Q: This method plays 24 rounds of rps and returns the total points earned. For each of the 24 rounds,…
A: Note: Below is the required program in Java language. Program Approach: Importing the necessary…
Q: id data is entered. If user enters an invalid data, then appropriate message should be displayed…
A: EXPLANATION Create a simple class student which will have two fields name and marks. Now call…
Q: Write a Java class called "Colors.java" that generates two random colors, then it applies a…
A: Below is the code in java and sample output:
Q: in JAVA Assume that a receipt id contains characters that represent information or that can be used…
A: Below I have provided a java program for the given question. Also, I have attached a screenshot of…
Q: Fill in the missing parts of the below method. The method is named calcMPG. It takes in two…
A: Given:- Fill in the missing parts of the below method. The method is named calcMPG. It takes in…
Q: Write a method printMultiples that takes two integers x and y as parameters, and prints the numbers…
A: import java.util.Scanner; public class Main{ public static void printMultiplies(int x, int y){…
Q: Scenario Write a calendar class that uses enums to find out which month and day of the week it is.…
A: Answer
Q: Write a class named PingPong that has a method next that alternates between printing 'PING' and…
A: Here is the python code: See below step for code.
Q: For this program, you will create a class modeled on a real-world combination lock. A combination…
A: It is defined as a programming language and a platform. Java is a high level, robust,…
Q: (The Rectangle class) Following the example of the Circle class in Section 8.2,design a class named…
A: Note: The given program is compiled and executed in "NetbeansIDE"
Q: Suppose that a Scanner object contains a bunch of tokens all on a single line separated by spaces.…
A: Program code: //import the required packages import java.util.*; import java.lang.*; import…
Q: Given the following code, please write me a method called "getPerimeter()" which will sum up the…
A: In this, we have given a Java code. Inside the Triangle class, we have to create a method…
Q: Suppose there is a class called Thing and a method you attempt to call a method called myThing()…
A: there is a class called Thing and a method you attempt to call a method called myThing() like this:…
Q: 2. Write a method that takes the values of two angles of a triangle and calculate the third one.…
A: Please find the answer below :
Q: Write a method named raiseSalary that accepts two integers as an argument and returns its sum…
A: Function:- public static double raiseSalary(int firstInt,int secondInt){ int…
Q: For the Java code below, you will demonstrate the ability to use and call multiple methods in your…
A: import java.text.DecimalFormat;import java.util.Scanner; public class CS1210 { //method to converts…
Q: Write a program that asks the user to enter an item’s wholesale cost and its markup percentage. It…
A: The program is written in C#
Q: Create a program for Smalltown Regional Airport Flights that accepts either an integer flight…
A:
Q: Write a class encapsulating the concept of a television set, assuming a television set has the…
A:
Q: Modify the program below and add a public method called isZero() to the Fraction class. This method…
A: CODE: import java.util.ArrayList; import java.util.Scanner; //Define the class Fraction class…
Q: In this exercise, you have to implement a calculator which can perform addition, subtraction,…
A: public class Calculator {double num1,num2; public Calculator( double num1,double num2) {…
Q: To encourage good grades, Hermosa High School has decided to award each student a bookstore credit…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Build a simple lottery program that asks the user to input six numbers, prints those numbers, spins…
A: Build a simple lottery program that asks the user to input six numbers, prints those numbers, spins…
Q: a) Write a boolean method called productDivisibleByThree that returns true if the product of the…
A: Note: As per our guidelines, we are supposed to answer only one question. Kindly repost other…
Q: program that asks the user to enter an item’s wholesale cost and its markup percentage. It should…
A: Markup refers to the difference between the selling price of a good or service and its cost. It is…
Q: Write a class called widget with an dollars; those values are passed in when a widget is created.…
A: class Widget: name = "" cost = 0 def __init__(self, name, cost): self.name =…
Q: Following the example of the Rectangle class of Chapter 9 Exercise 1, design a class named Cuboid to…
A: public class Cuboid { private int length,width,height; Cuboid(int length,int…
Q: Write a method named checkScreenTime that accepts the age of a person. The method will display the…
A: Algorithm: Start Read age of a person Implement a method checkScreenTime which takes age as…
Q: method simulates the playing of one round of “Rock Paper Scissors”. In this strange version of the…
A: Rock, Paper, Scissors (sometimes called roshambo) has been a staple to settle playground…
Q: To encourage good grades, Hermosa High School has decided to award each student a bookstore credit…
A: Note: Programming language is missing in the question. So we will answer this program in Java…
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 R 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.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- 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, as follows: John, your GPA is 3.4, so your credit is $34.0.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.0To 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.
- maximum hours (inclusive). Make sure to cast the maximum range to an int before using it as parameter invoke the method to start the engine invoke the fly method and use as the input parameter the random number generated on the previous step invoke the method to land the plane and stop the engine invoke the addGas method. Invoke the calcGasNeededToFillTank () method to figure out the fuel needed to fill the tank and pass this value as input parameter to the addGas method.Create a calculator program. Get 2 numbers from the user. Create a method that adds the 2 numbers. Create a method that subtracts 1 number from the other. Create a method that multiplies the 2 numbers. Create a method that divides one number by another. It is important to check that you are not dividing by 0 here. You should be calling these methods from the main method and printing out the answers from the main method. Create a method that uses the modulus to return the remainder and the language is JavaCreate a method where a goblin will attack a zombie as long as the zombie has no health, otherwise the zombie is already dead. If the zombie has 0 or less health, the attack method should add 10 health to the zombie, bringing them closer to being alive so that they will be dead it should then return the zombies health. If the health of the zombie is positive the attack method should return "Zombie is alive, therefore it is not a zombie!". NOTE: This problem statement is extremely vague. This is to test how well you follow directions.
- We will rewrite the Sales Bar Chart question to use method for printing out the bar chart. The part where the asterisks are printed out should be done with a method. Use this method for each bar. The original question statement is here: Write a program that asks the user to enter today’s sales for five stores. The program should display a bar chart comparing each store’s sales. Create each bar in the bar chart by displaying a row of asterisks. Each asterisk should represent $100 of sales. Here is an example of the program’s output: Enter today's sales for store 1: 1000 [Enter] Enter today's sales for store 2: 1200 [Enter] Enter today's sales for store 3: 1800 [Enter] Enter today's sales for store 4: 800 [Enter] Enter today's sales for store 5: 1900 [Enter] SALES BAR CHART Store 1: ********** Store 2: ************ Store 3: ****************** Store 4: ******** Store 5: *******************Create a calculator program. Get 2 numbers from the user. Create a method that adds the 2 numbers Create a method that subtracts 1 number from the other Create a method that multiplies the 2 numbers Create a method that divides one number by another. It is important to check that you are not dividing by 0 here. You should be calling these methods from the main method and printing out the answers from the main method See sample output below: Please enter 2 integers Please enter 2 integers 12 You entered 12 & 6. You entered 0 & 0. 12 + 6 = 18 0 + 0 = 0 12 6 = 6 0 - 0 = 0 | 12 * 6 = 72 O * 0 = 0 12 / 6 = 2 Both numbers are 0 and cannot be divided. Returning 0 | Please enter 2 integers You entered 6 & 0. 6 + 0 = 6 6. 0 cannot be used to divide by so cannot do 6 /0 |0 / 6 = 0Create a program named PaintingEstimate whose Main() method prompts a user for length and width of a room in feet. Create a method that accepts the values and then computes the cost of painting the room, assuming the room is rectangular and has four full walls and 9-foot ceilings. The price of the job is $6 per square foot. Return the price to the Main() method, and display it. An example of the program is shown below: Enter length of the room in feet >> 30 Enter width of room in feet >> 16 Cost of job for 30 X 16 foot room is $4,968.00 In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output statements as follows: WriteLine("This is an example: {0}", value.ToString("C", CultureInfo.GetCultureInfo("en-US"))); using System; using static System.Console; using System.Globalization; class…
- Assignment using Methods For this exercise, you need to complete all the questions in a single project. You will invoke the methods from your main. Questions 1-6 is due at the end of your next class. Write a method with the following specifications:name: DisplayMenuarguments: nonereturn value: nonetasks: display the following menu choice on the screenCalculation Menu3) Calculate Sum 4) Calculate Sum of Squares5) Calculate Sum of Cubes0) To ExitEnter the number that corresponds to your choice: You may beautify the output to your own likings. You don’t have to implement the functionalities of the various menu choices at this stageCall this method from your main. Modify your main so that the above method is call repeatedly. The program will terminate when the user enters 0. Any other choice should produce an error message. Because you will not be doing any arithmetic you may accept the user response either as an int, or a char or a string. Write a method with the following…A prime number is a number that is evenly divisible only by itself and 1. For example, the number 5 is prime because it can be evenly divided only by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Write a method named isPrime, which takes an integer as an argument and returns true if the argument is a prime number, or false otherwise. Demonstrate the method in a complete program. Tip: Recall that the % operator divides one number by another, and returns the remainder of the division. In an expression such as num1 % num2, the % operator will return 0 if num1 is evenly divisible by num2. can you please write it in java.util.scanner form and can you make it so i can copy and past it thank you in advanceCreate a method "public void giveRaise(int percentage)" in the Employee class. This method should increase the salary member by the percentage specified in the parameter. In the main method: 1. Create an Employee object. Print out its toString() result. Call giveRaise with 10%. 2. Print out its toString() result.