Question 1: With Java, Write a program that will ask the user to enter the following personal information about himself/herself (full name, address, date of birth, phone), store each in a variable, the program will then print them, each on a separate line using one print statement.
Q: in java write a program that reads an unspecified number of integers, determines how many positive…
A: The program is divided into 3 parts 1. declaration section where all the variables needed by the…
Q: One Computer Science program uses the following rules tor CS course placement: 1. if the CS AP score…
A: Objective: This program determines CS placement for students depending on certain given rules. The…
Q: I have no idea how to start this problem. This is the question - Write a program that declares two…
A: PROGRAM: //Importing time header file to access the functions import java.time.*; //Defining the…
Q: Write a java language program that will compute the salary of the employee. The program will accept…
A: public class Exam1{ public static void main(String[] args) { Scanner sc= new…
Q: Program41.java Write a program that prompts the user to enter a full name consisting of three names…
A: ANSWER: Find Initial of name: Output:
Q: Test Case 1 Enter number of seconds \n
A: The user for a number of seconds. Display the number of minutes , seconds, and hours accordingly. 60…
Q: In this exercise, you will create a java program that reads words from the user until the user…
A: Code:
Q: Prompt the user to input an integer, a double, a character, and a string, storing each into separate…
A: Read the inputs. Print them with a single space. Print them in backwards. Print the double to an…
Q: (1) Write a Java program named ConeVolume. (1 mark) (2) The program should read and store Cone's…
A: PROGRAM CODE: import java.util.*; // import java utility packagepublic class Main{…
Q: Write a Java program (TicTacToe.java) for playing tic-tac-toe. You may assume that two human players…
A: import java.util.Scanner; public class TicTacToe { public static void main(String[] args)throws…
Q: in java, Write a complete program that allows the user to enter the last names of 5 candidates in…
A: //import the required package import java.util.Scanner; //define a main class public class…
Q: Write an application that prompts a user for two integers and displays every integer between them.…
A: import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new…
Q: Please use java A complex number is a number in the form a+bi, where a and b are real numbers and…
A: The java code
Q: You are asked to write a java program to prepare for the Lebanese parliament elections. Your program…
A: I have provided JAVA CODE along with OUTPUT SCREENSHOT---------------
Q: Problem: Ms. Cruz gives four exams during the semester in her Programming class. At the end of the…
A: Program: import java.util.*; public class Main { //method to calculate total public static…
Q: CODE MUST BE IN JAVA PLEASE READ THE QUESTION AND DON'T JUST COPY PASTE THE ANSWER FROM ANOTHER…
A: Given: Create a program that takes in a student’s full names and marks for 3 In-class exercises,…
Q: Java please give a sample code. Primary U.S. interstate highways are numbered 1-99. Odd numbers…
A: Java is one of the most popular and widely used programming language. Java has been one of the most…
Q: Write an application that allows a user to enter any number of student quiz scores, as integers,…
A: while ( true ) { ... if ( Condition ) { break; } ... } The above while-loop…
Q: ) The Bahraini Charity Club is conducting a fundraiser by selling chilli dinners to go. The price is…
A: PROGRAM INTRODUCTION: Import the required libraries. Start the definition of the main function.…
Q: Calculate int result = (int) (w% z * x - (u / z - y)); as Java calculates it. What value does…
A: The result variable will be 7 I have given explanation below,
Q: Create a Java program that asks the user to enter three (3) first names then display the following…
A: The Answer is
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: import java.util.*; public class ThreeLetterAcronym{ public static void main(String[] args) {…
Q: java Exercise 1: Write a program to do the following using the Math class: Ask a user to enter two…
A: We need to solve: Exercise 1:Write a program to do the following using the Math class: Ask a user to…
Q: Write a program that prompts the user to enter a full name consisting of three names (first middle…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: Write a piece of Java code that will have a loop that counts the number of space characters that…
A: Loop is a control flow statement that executes a block of code in the loop until the condition of…
Q: Program43.java Here are some data regarding a retail purchase: item: photo paper dept: A price:…
A: SOURCE CODE public class Program43{ // main method public static void main(String[] args) {…
Q: Write a program GuessMyNumber game. When it's finished, it will work like this: I'm thinking of a…
A: java code for the given question :- import java.util.*;import java.lang.*; class GuessMyNumber {…
Q: In right triangle ABC below, angle C is 90 degrees, side a = 48 , and side c = 73. Write a Java…
A: Program42.javaIn right triangle ABC below, angle C is 90 degrees, side a = 48 , and side c = 73.…
Q: Write a program in Java Write a program that has variables to hold three test scores. The program…
A: Java is programming language. It contains extensive libraries (packages). It can be used to create…
Q: b. Weight c. Height 2. Compute the BMI of that individual 3. Make the following decisions if:…
A: Define packages java.util and java.lang for i/o operations and fundamental classes respectively…
Q: You are playing a game that has two dice – one die has 6 sides numbered 1 through 6 and the second…
A: In the program below, I have generated random numbers to simulate the dices but you can modify the…
Q: 1- Write a Java code that asks the user to enter the integer (XA, YA) Ccoordinate of a point A and…
A: import java.util.Scanner;public class Main{ public static void main(String[] args) { float a,…
Q: What is the numeric value of each of the following expressions as evaluated by Java? a. 4 + 6 * 2 f.…
A: All the expressions are solved based on operator precedence. the operator precedence decreases from…
Q: In a sample Java source code three variables ag1, age2 and age3 are declared as integers, where age3…
A: As per Bartleby policy we are allowed answer only one question Q.3 Source Code import…
Q: A parking garage has two types of customers: members and non-members. During week working days,…
A: The ask is to write a Java program to calculate the parking charges for different customer types…
Q: Write a program GuessMyNumber game. When it's finished, it will work like this: I'm thinking of a…
A: Answer import java.util.Random;import java.util.Scanner;public class GuessStarter{ public static…
Q: Using Java,You are given an integer variable dollarAmount that will have an integer value of ten or…
A: This can be achieved by following the below steps: Modulus with 10 results in one's place decimal…
Q: 3) Write a Java program that prompts the user to enter a sentence (phrase), then it counts how many…
A: Please find the answer below :
Q: (3) Write a Java program that prompts the user to enter a sentence (phrase), then it counts how many…
A: import java.util.*;/*Name : K,KASI REDDY * STUDENT NO.123 */public class Main { public static…
Q: In Java, which data type is used to store the following symbol '<' ?
A: Java is a platform for developing application based on object oriented programming language. It is…
Q: Create a java Program,In this question you are asked to write a lottery game application. Your…
A: import java.util.Scanner;import java.util.Random;public class Lottery{ public static void…
Q: The following program generates an error. Why? public static void printSum(int num1, int num2) {…
A: main is void so, it can not return any value hence, return 0 should not be there. printsum() is…
Q: JAVA CODE Write a program that quizzes the user on the names of the capital cities for all the…
A: Code snippet:
Q: Help in Java please - I am receiving invalid statement codes for this application Write an…
A: public class TriangleYN{public static void checkTriangle(double a,double b,double c)//our static…
Q: a. Four integer variables have been declared and initialized: p1 = 1, p2 = 2, p3 = 3, and p4 = 4.…
A: Write a JAVA program to declare and initialize four integer variables p1 = 1, p2 = 2, p3 = 3, and p4…
Q: In java. Write a program that makes use of random number generator from Math.random(). When…
A: Code import java.util.Scanner;public class Main{ public static void main(String[] args) {…
Q: Decide which of the following statements is either true or false and re-correct the false ones. 1.…
A: Note: Since you have asked multiple questions we will solve only few questions for you and if you…
Q: Program41.java Write a program that prompts the user to enter a full name consisting of three names…
A: AS PER OUR BARTLEBY ANSWERING GUIDELINES WE ARE ALLOWED TO ANSWER ONLY THE FIRST QUESTION POSTED BY…
Q: Please code this in Java. Write a program to input a phone number and output a phone directory with…
A: Hello student Please do like if this solution will help you I really work hard for getting accurate…
Q: Write a program that prompts the user to enter a number within the range of 1 through 10. The…
A: JAVA Code for above: import java.io.*;import java.util.Scanner; class Program { public static void…
Question 1:
With Java, Write a
Question 2:
The following are the ingredients of a donuts recipe (5 cup of sugar, 2 cup of butter, 6 cups of flour), this recipe makes 30 donuts . Write a program with Java that will ask the user how many donuts they want, the program will then print on screen how many cups of each ingredient is needed.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- in java: Write a program that reads the following information and prints a payroll statement: Employee’s name (e.g., Smith) Number of hours worked in a week (e.g., 10) Hourly pay rate (e.g., 9.75) Federal tax withholding rate (e.g., 20%) State tax withholding rate (e.g., 9%) Your program must use proper formatting for the output either by using the printf command or String.formatWrite a program in Java Write a program that has variables to hold three test scores. The program should ask theuser to enter three test scores and then assign the values entered to the variables. The programshould display the average of the test scores and the letter grade that is assigned forthe test score average. Use the grading scheme in the following table:IN JAVA Complete the program below so that it prompts the user for a temperature value, followed by a character that represents the type of temperature: C for Celsius F for Farhenheit If the character represents Fahrenheit temperature (F), convert the temperature value to the equivalent value in Celsius, using the following formula:C = (5/9)(F - 32.0)where C represents the Celsius temperature value, and F represents the Farhenheit temperature value. If the character represents Celsius temperature (C), convert the temperature value to the equivalent value in Farhenheit, using the following formula: F = (9/5)C + 32.0
- Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. ***Java please***Write a whole program to ask the user for his/her name, age, and gpa, then print on the screen "Hello NAME!, you are AGE years old and your Grade Point Average is GPA.", where NAME, AGE, and GPA are replaced by the values that the user typed.User data should be stored in a struct variable of type userType, which has three components: name of type string, age of type int, and gpa of type double. Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed by the test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest test score. Student data should be stored in a struct variable of type studentType, which has four components: studentFName and studentLName of type string, testScore of type int (testScore is between 0 and 100), and grade of type char. Suppose that the class has 20 students. Use an array of 20 components of type studentType.…Please use java A complex number is a number in the form a+bi, where a and b are real numbers and i is √(-1) The numbers a and b are known as the real part and imaginary part of the complex number, respectively. You can perform addition, subtraction, multiplication, and division for complex numbers using the following formulas: a + bi + c + di = (a+c) + (b+d)i (addition) a + bi − (c + di) = (a−c) + (b−d)i (subtraction) (a + bi) * (c + di) = (ac−bd) + (bc+ad)i (multiplication) (a + bi) / (c + di) = (ac+bd) / (c2+d2) + (bc−ad)i / (c2+d2) (division) You can obtain the Absolute Value for a complex number using the following formula: |a + bi| = √(a2 + b2) A Complex number can be interpreted as a point on a plane by identifying the (a,b) values as the coordinates of the point. The absolute value of the complex number corresponds to the distance of the point to the origin, as shown in example below. (1) Design a class named Complex for representing complex…
- The following question is requested to be in Java:Write a piece of Java code that will have a loop that counts the number of space characters that appear in the String object str.In Java Write a program that checks the properness of a given variable name. Morespecifically, your program should specify whether a user-entered variable nameis (1) illegal, (2) legal but uses poor style, or (3) good. There are differentopinions as to what constitutes a good style for a variable name. For thisprogram, check for good style using these rules:· Only use letters and digits.· Use a lowercase letter for the first character.You do not need to check for an uppercase letter for the first letter in the secondand third words, ...etc.Your program should repeatedly prompt the user for variable names until the userenters "q" or "Q." the program terminates when the user enters the "q" or "Q." Sample session:This program checks the properness of a proposed Java variable name.Enter a variable name (q or Q to quit): streetAddress2Good!Enter a variable name (q or Q to quit): street address2Illegal.Enter a variable name (q or Q to quit): StreetAddress2Legal, but uses poor style.Enter a…Write a complete Java program that performs the following tasks: Ask the user to enter the last two digits of his/her student ID. Break the number into two digits using arithmetic operators, then store the first and second digits in integer variables named digit1 and digit2 Find and print the following: The product of digit1 and digit2. The sum of digit1 and digit2 The average of digit1 and digit2 The maximum of the two numbers; digit1 digit2 using a method from the class Math. Note: The class name of your Java program must be your first name. Your answer should have the code as text as well as the screenshot of the program output (using your own student ID) as a part of your answer. Otherwise, zero marks will be awarded.
- Ask the user for a number of seconds. Display the number of minutes, seconds, and hours accordingly. 60 seconds in 1 Minute 3,600 seconds in 1 hour 86,400 seconds in 1 day Write a code in Java that results like test case examples. ThanksIN JAVA The following program generates an error. Why? public static void printSum(int num1, int num2) {System.out.print(num1 + num2);}public static void main(String args[]) {int y;y = printSum(4, 5); return 0;} A. printSum() is missing a "return;" statement. B. The values 4 and 5 cannot be passed directly to printSum() C. main() has a return statement that returns the value 0 D. printSum() has void return type, so cannot be assigned to a variableProgram42.javaIn right triangle ABC below, angle C is 90 degrees, side a = 48 , and side c = 73. Write a Java program that uses class Math to calculate the length of side b and the other two angles (in degrees). Express all measures accurate to two decimal places. See "Help with triangle program" above. Program43.javaHere are some data regarding a retail purchase: item: photo paper dept: A price: $8.99 quantity: 4 taxable: true Assign these data items (without user inputs) to Java variables of the most suitable type as suggested by the values. Then use the variables to calculate and generate the output exactly as shown below. Use only the printf() method. Purple indicates a variable to be displayed using a printf format specifier.Required OutputPurchase: photo paper, quantity 4 @ $8.99Dept A, taxable? trueSubtotal $35.967 % sales tax is $2.52Total payable $38.48