(1) Write a Java program named ConeVolume. (1 mark) (2) The program should read and store Cone's radius and height. The radius and height values should be typed in by the user in response to a prompt message. (2 mark) (3) Then it should compute and display Cone's volume. (3 marks) (4) You must type your name and student number above the class declaration using a comment. (1 mark) The cone's volume is given by the following equation: V = nr2" %3D Where, r is the radius and h is the height.
Q: sing Java Input the name and age of the student and display its values. A class Student has two…
A: Since the name of the UML diagram is not mentioned, I am drawing a class diagram for the given…
Q: Execute the program. There should be no syntax errors. Modify the program so it displays "I'm…
A: public class Main{ public static void main(String[] args) { System.out.println("I'm learning how…
Q: Design a Java class named Rectangle to represent a rectangle. The class contains: v Two double data…
A: The given program is below with commented code, screenshots of the code and output. Th code contains…
Q: Construct a java package named "Calculator" which helps to calculate different mathematical…
A: Myprogram.java: package Calculator; import java.util.Scanner; public class MyProgram { public…
Q: Write, compile, and test a class that displays your favorite movie quote, the movie it comes from,…
A: System.out.println("Movie: Forrest Gump");System.out.println("Quote: \"Life is like a box of…
Q: Create a java program that will enable user to enter their first name , second name , their…
A: java code UserInfo.java import java.util.ArrayList; import java.util.List; import…
Q: In a Java Language codes Last month Joe purchased some stock in Acme Software, Inc. Here are the…
A: Java program: //Main class public class Main { //main class public static void…
Q: Write a program Gas.java that computes and displays the price a person will pay for gas at the gas…
A: public class Gas { public static void main(String[] args) { if…
Q: Java Program. Create a java program that will compute the basic salary of the employee, the…
A: public class Solution { public static void main(String[] args) { int daily_rate = 80;//given daily…
Q: Create a Java application, with any name, that prints some information about yourself on the screen.…
A: System.out.print statements are used to print the contents on console and let's print the basic info…
Q: Write a java program to display a greeting message and name it as greetings.java. The me include the…
A: Please find the answer below : Code Screenshot : Executable Code: public class Greeting {…
Q: Given our daily routine, regular physical activities are increasingly necessary. After all, sofa…
A: Please upvote Please Please Please. I need it badly. I am providing the java code the above…
Q: Java has eight primitive data types. Which of the following is a subset of these eight? Select one:…
A: byte, short, int, boolean
Q: Write a java class called ‘student’ with name, Marks of 3 subjects of your choice and total Marks.…
A: Sample Response: // Java Programimport java.util.*;//student calss declareclass Students{…
Q: Java code please 1. A Simple Game by CodeChum Admin You probably are fond of games. This quiz though…
A: Circle.java public class Circle { int x; int y; int radius; public Circle(int x,int y,int…
Q: Write a java class called ‘student’ with name, Marks of 3 subjects of your choice and total Marks.…
A: The program states the inheritance in which student class data members are acquired to the calculate…
Q: (1) Write a Java program named SphereVolume. (2) The program should read and store Sphere's radius.…
A: PROGRAM CODE: import java.util.*; // import the java utility packageclass…
Q: Write, compile, and test a class that displays at least four lines of your favorite song. Save the…
A: I have written 2 codes for this question. Both codes output the same as per our requirement. I have…
Q: Java: A place to buy candy is from a candy machine. A new candy machine is bought for the gym, but…
A: Steps 1) switch case is employed for the choice of the item by taking correct input from the user 2)…
Q: Supposing you have set up a business that is carrying out a commercial activity and making profits,…
A: ANSWER:-
Q: Write, compile, and test a class that displays the pattern shown in Figure 1-26. Write your Java…
A: The ask is to write a java program to build a triangle with the given pattern.
Q: Create a Java program that determines with four entered numbers whether the product of the first two…
A: In Java, the class is a user-defined data type that creates an object. The variables and methods of…
Q: use JAVA, please Use of Classes, methods, and various control statements Scenario: A…
A: Source Code: import java.util.*;import java.lang.*;import java.io.*; class driver{ public static…
Q: Write, compile, and test a class that displays your favorite movie quote, the movie it comes from,…
A: Program description: In the main method of the java program,FavoriteMovieQuote.java, declare string…
Q: use JAVA, please Use of Classes, methods, and various control statements Scenario: A…
A: import java.util.*;import java.lang.*;import java.io.*; class driver{ public static void main(String…
Q: Overview In this task, you should write a program that asks the user to enter one or more sentences.…
A: Here is your solution with an output snippet.
Q: Create a java code that the user will input a certain letter then identify a color that corresponds…
A: I have provided JAVA CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOTS--------------
Q: Create a complete Java program that shall allow the user to accept three integer values representing…
A: The question asks to allow user input via Start, End, Step. Now, keep adding steps until the end…
Q: Create appropriate Java program using 2 class, 1 constructor and 1 method to calculate area of…
A: Create a program using java which has 2 class, 1 constructor and 1 function/method to find the area…
Q: Design a Java class named Rectangle to represent a rectangle. The class contains: Two double data…
A: I give the code in java as per your requirement along with output screenshots and code screenshots.
Q: Write, compile, and test a class that displays your favorite movie quote, the movie it comes from,…
A: Objective: This program reads the value of some information on a movie quote from the user and…
Q: Direction: Apply appropriate Java coding standards and provide the final Java programs for the…
A: //Note I had done while and for loop in same code you can move each of them to new program if you…
Q: a) Provide the name of the business and where it is located. p) Indicate the type of commercial…
A: ANSWER:- a) Name of the Business : Chocolate Desires and Location : Ghana b) Manfucturing of…
Q: how can you help Sunita Sharma ( for 65 plus ) years old to live a healthy and better life.…
A: We can help the elderly people in many ways like we can make an application which will connect the…
Q: Write a Shopping Cart class to implement a shopping cart that you often find on websites where you…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: In order for someone to be eligible to vote in the united states, the following requirements must be…
A: Java conditional statements are as follows: Use if to specify a block of code to be run, If a…
Q: Write a Java class named Rightiriangle that prompts the user to enter three integers that are to be…
A: I give the code in Java along with output and code screenshots.
Q: Supposing you have set up a business that is carrying out a commercial activity and making profits,…
A: Answer : a) Name of the Business : Chocolate Desires and Location : Ghana b) Manfucturing of…
Q: Create a Java Program that determines if sum of the first two numbers entered is greater or equal…
A: Sum.java - import java.util.Scanner; public class Sum{ public static void main(String[] args) {…
Q: reate a complete Java program that shall allow the user to accept three integer values representing…
A: import java.util.*;class Test{ public static void main(String[] args) { int input;…
Q: following questions. The language that needs to be used is Java
A: Approach: Here, we use Scanner class to take input from user by creating its object. Two string…
Q: 2. Create a Java Program that checks whether the input character is a vowel or Consonant using…
A: INTRODUCTION: Here we need to create a java to check whether the input character is a vowel or…
Q: reate a java program in swing that will produce the given output below. The program will have…
A: Given : Create a java program in the swing that will produce the given output below. The program…
Q: 1 /* Simple exercise: Create Java Swing project OR Command Line Interface for calculating students…
A: Program approach: Create an instance of Scanner for input. Declare all essential variables. Input…
Q: Supposing you have set up a business that is carrying out a commercial activity and making profits,…
A: I have implemented the given requirements in Java as per the specification. The code is as follows:…
Q: Write a class that declares a user’s hourly rate of pay and the number of hours worked. Display the…
A: Task :- Write a Java program to calculate the gross pay, tax and net pay for given input of rate pay…
Q: reate a java program that will ask the weight (kg) and height (cm) of the user, the program will…
A: Name of the controls on the frame The names of the controls on the frame are shown in the following…
Q: Create a java class named Shipment a. The program must ask for two separate packages to ship b.…
A: Java: Java is a high level, object oriented programming language. It was developed by James Gosling…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Assignment: Dice Rolling Program Objective: Create a Java program that rolls two dice and displays the results. The program should have two Java classes: one for a single die and another for a pair of dice. Assignment Details: User Input: Ask the user to specify the number of sides they want on each die. Ensure that the user's input is within a reasonable range. Dice Rolling: Simulate rolling the dice using Math.random() based on the user's chosen number of sides. Display the sum of the values rolled, e.g., "5 + 3 = 8." Special Combinations: If the dice roll results in combinations of 2, 7, or 12, print special messages: "1 + 1 = 2 snake eyes!" "3 + 4 = 7 craps!" "6 + 6 = 12 box cars!" Main Method: In the main method, create a pair of dice, roll them, and display the results. Allow the user to decide whether to continue rolling the dice or exit the program. Additional Features: You are welcome to add more features or enhancements to the program if desired. In…JAVACODE ( INTELLIJ ) The program needs to be ‘smart’ enough as well. When inappropriate values are entered to the program, for example, a negative age, then the program will ask the operator to enter the value again.Java Overview In this task, you should try using the Scanner class to read data from the keyboard. This data should be stored in variables in your program and then printed on screen. Task You should write a class called Story that should include a main method. This programs should create a fairy tale for a child. The program is based on a completed story, but some words must be replaced with such as the user may enter. The fairy tale you are going to based on are the following: The little ant (1) There was once a small, small ant that lived with its (2) and its (3) siblings in an anthill, by a large (4) in the forest. The little ant is called (1). For the most part, (1) and his siblings used to work on carrying (5) and (6) to the stack, but today it was (7), so (1) was free. The words that are crossed out are the words that your program should ask the user for. In total, there are seven entries the user must make. The program must save these entries in separate variables and then…
- Rolling Dice Simulator [Java Assignment]Objective: Create a Java program that rolls two dice and displays the results. The program should have two Java classes: one for a single die and another for a pair of dice. Assignment Details: User Input: Ask the user to specify the number of sides they want on each die. Ensure that the user's input is within a reasonable range. Dice Rolling: Simulate rolling the dice using Math.random() based on the user's chosen number of sides. Display the sum of the values rolled, e.g., "5 + 3 = 8." Special Combinations: If the dice roll results in combinations of 2, 7, or 12, print special messages: "1 + 1 = 2 snake eyes!" "3 + 4 = 7 craps!" "6 + 6 = 12 box cars!" Main Method: In the main method, create a pair of dice, roll them, and display the results. Allow the user to decide whether to continue rolling the dice or exit the program. Additional Features: You are welcome to add more features or enhancements to the program if desired.…Object-Oriented Programming ❤❤❤ Matchmaker with Java ❤❤❤ Summary: Create a Java application that will determine your true love. Prerequisites: Java, VS Code, and Terminal In this assignment you will develop and test a command-line application written in the Java language that asks questions to determine if a person is your true love. More specifically your application should ask five questions in the form of statements and allow the user to respond to each statement with the numbers 1 through 5 with 1 indicating strongly disagree and 5 indicating strongly agree. You will then compare the person’s answers with your desired “true love” answers. The closer the answers are to your desired “true love” answers the better match the two of you are for each other. For example, suppose you choose the statement “Broccoli is delicious.” and your desired answer was 1 (strongly disagree) because you really don’t like broccoli. If the application user entered 4 (agree), then the two of you would not…java finding Distance Between Points Write method distance used to calculate the distance between two points (x1, y1) and (x2, y2). numbers,return values should be type double. Incorporate this method into an application that enables the user to enter the coordinates of the points.
- Please provide answer in C#: Slot Machine Simulation A slot machine is a gambling device into which the user inserts money and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money that the slot machine dispenses back to the user. Create an application that simulates a slot machine. Figure 8-23 (on page 539 of your book) shows an example of how the form should look. The application should let the user enter into a TextBox the amount of money he or she is inserting into the machine. When the user clicks the Spin button, the application should display three randomly selected symbols. (Slot machines traditionally display fruit symbols. You will find a set of fruit symbols attached to this dropbox for your use - from the Student Sample Programs provided by the book author.) If none of the randomly displayed images match, the program should inform the user that he or she has won…Module 04 Content You are working as a software developer for a large insurance company. Your company is planning to migrate the existing systems from Visual Basic to Java and this will require new calculations. You will be creating a program that calculates the insurance payment category based on the BMI score. Your Java program should perform the following things: 1. Take the input from the user about the patient name, weight, birthdate, and height. 2. Calculate Body Mass Index. 3. Display person name and BMI Category. a. If the BMI Score is less than 18.5, then underweight. b. If the BMI Score is between 18.5-24.9, then Normal. c. If the BMI score is between 25 to 29.9, then Overweight. d. If the BMI score is greater than 29.9, then Obesity. 4. Calculate Insurance Payment Category based on BMI Category. a. If underweight, then insurance payment category is low. b. If Normal weight, then insurance payment category is low. c. If Overweight, then insurance payment category is high. d.…Retail StoreSuppose you have been consulted by a retail shop around your area to build a simple calculator. The calculator must be able to perform arithmetic operations (+, -, *, /) on integers. The program receives an expression from the user. The expression is structured as follows: integer input followed by an operator and another integer input from user prior to displaying the final result. Write a Java application that can perform the above expression. Create a method that takes two parameters and performs an arithmetic operation on the passed values. Your final output should consist of the expression and the result.
- Project Name: Chpt4_Project Class Name: Chpt4_Project Write a Java program that accepts the ingredients for a recipe in cups and converts to ounces. Inputs: The names of three ingredients and the number of cups for each. The ingredients are milk, flour, and sugar. Enter the first ingredient: Enter the second ingredient: Enter the third ingredient: Enter the number of cups for the first ingredient: Enter the number of cups for the second ingredient: Enter the number of cups for the third ingredient: Outputs: There will be two lines of output: The names of the ingredients in the following format. The items inside < > are variables. The recipe uses <ingredient 1>, <ingredient 2>, and <ingredient 3> The total volume of all three ingredients in ounces in the following format. The item inside < > is a variable. The total amount of the recipe in ounces is <total ounces> Step 1. Create an algorithm (either flowchart or pseudocode) that you…solve eith java :- Create a class for Subject containing the Name of the subject and score of the subject. There should be following methods: set: it will take two arguments name and score, and set the values of the attributes. If score is less than 0 or greater than 100.0 then a message should be displayed “Incorrect score” and score should be set to Zero. set: it will take one double value as argument and set the value of score only. If score is less than 0 or greater than 100.0 then a message should be displayed “Incorrect score” and score should be set to Zero. display: it will display the name and score of the subject. Like “Name : Math, Score: 99.9” getScore: it will return the value of score. greaterThan: it will take subject’s object as argument, compare the calling object’s score with argument object’s score and return true if the calling object has greater score. Create a class “Main” having main method to perform following tasks. Create two objects of Subject class having…Name: Instructor Course: ITSE 2321 Object-Oriented Programming (Java) Program: Four This program computes an employee's gross, net, and overtime pay. Enter your ID Number: 1001 Enter your pay rate: 12.50 Enter your hours worked: 36 Program 4 ID Number: Pay Rate: Regular Hours: Overtime Hours: Total Hours: Regular Pay: Overtime Pay: Gross Pay: Tax: Deductions: Net Pay: 1001 12.50 36.00 0.00 36.00 450.00 0.00 450.00 0.00 35.00 415.00