Write a code that asks the user for the properties if a triangle. Calculate the area. The area of a triangle is (1/2) *b*h. Please make it simple thank you! Test case 1&2 are example of result.
Q: Question 2: Implement the ShoppingCart and Product class with necessary properties so that the given…
A: code is here
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: 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: I need help doing this assignment. This is a java code bt
A: /** * Java Program to implement Linear Probing Hash Table **/ import…
Q: Write a Java program that reads five products’ prices, and discount percentage and then displays the…
A: Step 1: Declare class SalesClass. Step 2: Declare two fields to store the sum of price and discount…
Q: I need to create a class such as contact information with first and last name. I need to verify if…
A: Here I have created a class ContactInforamtion, with 2 data members to store the first and last…
Q: might not be reasonable to expect users to type long entries such as “oil change” accurately.…
A: import java.util.Scanner; public class CarCareChoice2 { public static void main(String[] args) {…
Q: Instructions Today you will be given a Frult class. From this, you will subclass Frult to make an…
A: /******************************************************************************…
Q: You will create a class called Square. Length will represent the length of one side which is an…
A: The mechanism of developing and implementing an executable computer program to achieve a particular…
Q: Test Case 1 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, & , 45, 44, 43,…
A: public class Main{ public static void main(String[] args) { for(int i=1;i<100;i++)//for…
Q: Implement the following class and invoke discountedPrice(): > Discountable discountedPrice (price:…
A: Objective: This program includes an interface and a class implementing the interface. The interface…
Q: Using the class below, produce a test code that calculate the area of a circle. 1. Use pow() 2.…
A: answer starts from step 2
Q: Create a program that can solve the Area of Circle, Square, Triangle, and Rectangles. Make the user…
A: ANS: Explanation of the code is given by the comments in the code itself. NOTE: The file name should…
Q: Write Java code for a Baby class. A Baby has a name of type String and an age of type integer.…
A: The class Baby has two attributes- name and age. name is of type string and age is of type int. A…
Q: Write a java program to print the area of a rectangle by creating a class named 'Area' having two…
A: The required Java code is given below: import java.util.Scanner;public class Area{ // class Area…
Q: A microwave control panel has four buttons: one for increasing the time by 30 seconds, one for…
A: public class Microwave { int time = 0; int switch_b = 1; public void start( ) {…
Q: Ask the user for a number of seconds. Display the number of minutes, seconds, and hours accordingly.…
A: Here, Code instruction is given.
Q: TRY TO MAKE ANY SIMPLE PROGRAM USING JAVA APPLET , YOUR PROGRAM MUST HAVE 4 FUNCTIONS OR IT CAN DO 4…
A: In below i am writing java applet program in which i am using 4 functions name as:…
Q: In this assignment, you will need to design and implement a class Country (Country.java) that stores…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program to print the area of a rectangle by creating a class named 'Area' having two…
A: Start Input length Input breadth Create instance Set Dimensions Print Area Stop
Q: uniqueChars is a method that you will code now, should be able to accept any string in the world and…
A: import java.util.*;public class Main{ public static void main(String []args) { Scanner…
Q: In Java, one way to determine how healthy a person is by measuring the body fat of the person. The…
A: Hello Student. Warm welcome from my side. Hope you are doing great. Here's your answer. I will try…
Q: a class, Team.java, that has the following: * two private instance variables: a String named color…
A: // Java Code: import java.io.*; class Team{ //declaring the private variables private String color;…
Q: Write a program that lets a user calculate their body mass index . BMI is calculated using height…
A: Java program to take height and weight from the user and print BMI on the console.
Q: Prompt the user a 24-hour clock time value(military time) and convert it to a 12-hour clock value.…
A: GIVEN: Prompt the user a 24-hour clock time value(military time) and convert it to a 12-hour clock…
Q: In java programming, how can I retrieve an int instance variable from another class without…
A: In Java variables can be called from another Class in two ways:First :By creating an object of the…
Q: There are several cases where we can use conversions from one quantity to another. It can be about…
A: given data
Q: Write a complete method having the signature myfloor(double value) that can return mathematical…
A: Java Code : //importing package to read input from the user by using scanner classimport…
Q: n the absence of any constructors, what will happen in Java? O Send out a cautionary note. Send out…
A: the default constructor is present
Q: Write a program to print the area of a rectangle by creating a class named “Rectangle” with…
A: // Create a class constructor for the Main class public Rectangle() { width = 0; //…
Q: Create a test class that asks the user to input the height, radius, and color of the silos and then…
A: ALGORITHM:- 1. Take input for height, radius and color from user. 2. Calculate the area and height…
Q: Java Code Please Output The first few lines contain the drawn rectangle. After one empty line, the…
A: Solution:
Q: Java Code Please Output For each of the getter methods that gets called, the values they return must…
A: Answer: our instruction is to answer the first three questions from the first question I have done…
Q: Output the numbers 1-100 inclusive starting with 1. Please a comma and a space after each number…
A: Given: Output the numbers 1-100 inclusive starting with 1. Please a comma and a space after each…
Q: n Java, I want the user to enter in a 5-digit number, and if they enter incorrectly, I want to give…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Q: Create three interfaces for the following using java language One method that accepts the number and…
A: Note: Here student just asked to create three interface and perform the given function to evaulate…
Q: Write a program that asks the user for their nickname, then prints out a welcome message like this:…
A: Please find the answer below
Q: For the 8 Java statements below, identify each of the following statements as legal or illegal, and…
A: The answer of the question is given below:
Q: If a method is written to receive a double parameter, and you pass an integer to the method, then…
A: Double is the data type that stores the double precision values. Double stores decimal values. The…
Q: Write a program to test the class LinkedBag. For example create a bag by asking the user for few…
A: In the Main class I created an object of type linkedBag and asked the user to enter names to enter…
Q: You are given a Conversion class and need to complete it by adding two static methods. The first…
A: import java.io.*; public class Main { static double gallonsToPints(int gallon) {…
Q: Create a "tank" class and use it in a program that accepts height and radius from the user and…
A: The class tank will be created using the keyword class. The __init__ function will initialize the…
Q: 30. True or False: The parameterized constructors of Java does not accept any parameters instead,…
A: Answer: False
Q: i need it in util.java.scanner form and can you make it so i can copy and past it please thanks…
A: Required java code using util.java.scanner provided below:
Q: Write a java program that asks the user to enter the coordinates of 4 points that draw two different…
A: import java.util.*; class Main { public static void main(String args[]){ Scanner in =…
Q: Write a java program to print the area of two rectangles having sides (4,5) and (5,8) respectively…
A: Input : In input, the object of the Rectangle class is created. In object creation, the…
Q: Write an assignment statement that will store the result of multiplying two variables, price and…
A: The assignment statement is written by using assignment operator. The assignment operator is as…
Q: import javax.swing.JOptionPane; public class MultipleChoiceQuestion { static int correct = 0;…
A: The bugs were completely removed, please follow the procedure to run java program that is file name…
Q: I want to create a constructor for the job name and salary cost and then add the names of the jobs…
A: Ans:) As per the given requirements, we have to create a constructor and assign some values. Java…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Welcomes user to the Windchill Temperature (WCT) Weather Report calculator. Prompts the user to enter the decimal precision (within range 1--4) at which WCT will be reported. If a user inputs an out-of-range value for 'decimal precision' then print a message and exit (see samples below). Prompts the user to enter the name of location for which WCT will be calculated. Prompts the user to enter the air temperature and wind velocity for this location. You can assume that the user always enters a valid float value for these. Prints the WCT at the desired precision. WCT can be calculated using the National Weather Service calculation given at the bottom of this figure"A gym assigns all patrons a membership ID number that consists of eight alphanumeric characters. The first character could be any capital letter, A through Z; the second and third characters must be 0, 1, or 2; the fourth character could be any capital letter, A through Z; and the rest of the characters can be any digit excpet 0. Digits and letters can be repeated.Write a Case clause that specifies all numbers less than 0.
- Write a statement that assigns my exam score with 82 write a statement that assigns mycurvedexamscore with my exam score + 5X is integer value based on your the last TWO(2) digit Matric Card number. Ifthe value X is ODD, please check Left shift AND assignment operator afterX<<=2. If the value X is EVEN, please check Right shift AND assignmentoperator after X>>=1 .Create an application that converts Celsius to Fahrenheit. The formula is F=1.8×C+32 where F is the Fahrenheit temperature and C is the Celsius temperature. If the user fails to enter numeric values, display an appropriate error message and do not attempt to perform calculations. Use the following test data to determine if the application is calculating properly: Celsius Fahrenheit100 2120 3256 132.8 Use Visual Basic
- Practice -1-• Write a code to find the area and parameter of a square.• Requirements: – User enter the side of the square (S)– Calculate the area=SxS– Calculate the perimeter=4XS– Display the area and perimeter– Datatype is int. Practice -2-• Write a code to ask the user to enter his first name initial and last name initial the display. Below is a sample output.How many times will the message box be displayed in the given code below? For x = 4 To 11 Step 3For y = 1 To 3MsgBox (“Hello”)Next yNext x What will the following code display in the lblSum control? Dim sum, num, no As Integersum = 0num = 1Do While num < 3For no = 1 To 4sum = sum + no Next nonum = num + 1LooplblSum.text = sumThe basic Excel command that uses relational or comparison operators to determine if the value or label in a cell should be formatted is: O a. Highlight Cells Rules O b. Standard Deviation Conditional Selection O d. DataFind O e. Conditional Rules C.
- Assume that the population of Mexico is 128 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 323 million and that the population is reduced 0.15 percent annually. Write an application that displays the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display The population of Mexico will exceed the U.S. population in X yearsProfessor Zak allows students to drop the four lowest scores on the ten 100-point quizzes she gives during the semester. Design an application that accepts a student name and 10 quiz scores. Output the student's name and 10 quiz scores. Output the student's name and total points for the student's six highest-scoring quizzes. Modify the application so that the student's mean and median scores on the six best quizzes are displayed.repeat 5 times enter the salesperson's name and sales amounts calculate the bonus by multiplying the amount sales by 3% print the salesperson's name and bonus amount end repeat 1. When the user types David Jones as the salespersons name and 2000 as the sales amount into the algorithim depicted in figure 1. What will it print? 2.How would you change the above algorithim to print the salespersons sale and bonus amount as well? 3. How would you change the above algorithim to make it applicable to any number of salespersons?