mber of stars remaining. Use A loop. Please Write the code in Java and use the test ca
Q: I am trying to get this code to run and but the program calls an syntax error on the else if I…
A: note: I am the expert who provided this code to you. I again copied the code that you gave above and…
Q: Write an application that prints the following diamond shape. You may use outputstatements that…
A: Given: Write an application that prints the following diamond shape. You may use outputstatements…
Q: 4) Complete the Java code for the following for loop: for (int i= 1; i <= 6; i++){ // your code here…
A: Answer: Java Source Code: public class Main{ public static void main(String[] args) { int number…
Q: THIS IS JAVA PROGRAMMING THIS IS A REPOST ALREADY IF YOU CAN'T ANSWER BOTH THEN LEAVE IT TO THE…
A: Given, Java program below is the updated code after removing the redundant code. and the…
Q: Your task is to write a JAVA program that ask the user to enter the number of alphabets and digits…
A: Code: import java.io.*;import java.util.Scanner;import java.lang.Math; public class Main{ public…
Q: What is the output produced by the following code? int *p1, *p2; p1 = new int; p2 = new int; *p1 =…
A: #include <iostream>using namespace std;int main(){ int *p1, *p2;p1 = new int;p2 = new…
Q: Write a program in java that is going to read m donors' name surname and the amount donated, and…
A: PROGRAM EXPLANATION : - For sorting the Donors based on amount they have donated, it is good idea to…
Q: What is the output for the following java code? ... int index 0; 1; int result = while ( true ) {…
A: According to the question java is most important language in which we can use the so many things and…
Q: trace the following code and give the output. for (int k=5; k<=20; k+=5) cout << "? ";
A: The given code segment is for (int k=5; k<=20; k+=5) cout << "? "; Here, The code…
Q: Use the compareTo method to write code that reads two names from the console and prints the one that…
A: The compareTo() method is used for string handling in which it compares two strings…
Q: Your job is to write a program that gets a movie rating from the user as a double, and then rounds…
A:
Q: What is the output of the following?int count = 3;while (--count > 0)cout << count <<…
A: 2 1
Q: ] Write a program that prompts a user to enter a year between 1 and 2499 and prints its century in…
A: Start make function find_century that take year as an argument if year is less than 0 or more than…
Q: THIS IS IN JAVA Given x = 1, y = 2, and z = 3, how is the expression evaluated? In the choices,…
A: Given: <pre><code>(x == 5) || (y == 2) && (z == 5)</code></pre>
Q: What is printed out by the following code snippet? int i = 4; int z = 19; if (i > 3) { if (z <= 19)…
A: initially i=3 z=19
Q: This is the question I am struggling with - Write a program that inserts parentheses, a space, and…
A: Program: //PhoneNumberFormatjava import java.util.Scanner; public class PhoneNumberFormat {…
Q: In this exercise you will write a program to compute the distance between any two geo locations. In…
A: we have given GeoLocation class we have to implement its main method which is given below
Q: Create a Java program that uses a loop for • Reads from the console the names, weight in kg and…
A: public class Main { //Main Function public static void main(String[] args) { //Creating the…
Q: Implement the design of the Travel class in python so that the following output is produced: You…
A: Algorithm: Start Implement class Travel with a static variable count and class variables…
Q: determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it…
A: Error Correction Reason while(day > DAYS); while(day > DAYS) After while loop, don't…
Q: Q1: Print an Array Explain in detail in English how the following outputArr method works? public…
A: - According to the restrictions placed on us because of our guidelines we are allowed to anser the…
Q: Write a simple game in Java named GuessNumber.java to run on the command line. This program asks…
A: Program code: //Importing essential header files import java.util.Random; import java.util.Scanner;…
Q: What is the probability that in a classroom of x people, at least 2 will be born on the same day of…
A: Given data, What is the probability that in a classroom of x people, at least 2 will be born on the…
Q: create a class that asks a user for 2 string inputs (USE The Java. Util. SCANNER) -compare the…
A: (Disclaimer: Since you have asked multiple questions, we will solve the first question for you. If…
Q: tegers read the sum of all the odd integers read a count of the number of even integers read a…
A: import java.util.Scanner;public class Test { private static Scanner sc; public static void…
Q: Q. Write a java program to display the output like given below Please enter the amount of sale in US…
A: Program Approach: Importing necessary package Defining the main class Defining the main method…
Q: I don't know how to do this. Thanks in advance. Modify the CountByFives application from Chapter 6…
A: Algorithm: Start Read the countby value i.e start Initialize stop to 500 Initialize count to 0…
Q: Java Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is…
A: Here we are creating an object of Date class Date dt = new Date(); Then we are calling get time()…
Q: What is the output of the code snippet below: int[] intArray = new int[10]; for(int x = 0;…
A: 1. public class Main{ public static void main(String[] args) { //intArray variable is not…
Q: 4. Is It You, Cody? by CodeChum Admin Can you identify if Cody's name is spelled right? If so, then…
A: Java code for the given problem as follows :- import java.util.Scanner;public class MyClass {…
Q: Modify the code to display the current date in the MM/DD/YYYYmode. And, display the number of hours,…
A: Required: Modify the code to display the current date in the MM/DD/YYYYmode. And, display the number…
Q: You must call the class Assignment3A and put it in a file called "Assignment3A.java",…
A: Required: C++
Q: What is the output of the following while loop? int x - -5; while (x<0) printf ("4d ",++x) ; a) -5…
A: Below is the required code in C language: #include<stdio.h>int main(){ int x=-5;…
Q: This question is for java. Write a program that plays the Hi-Lo guessing game with numbers. The…
A: Java program to solve the given problem is below.
Q: Write a method that takes three integers and returns true if their sum is divisible by 3, false…
A: Note: We can answer only 3 at a time by Bartleby's Guideline using System; namespace Sample{ class…
Q: Write a program that reads a student’s name together with his or her test scores. The program should…
A: Grading System: 90-100, A; 80-89, B; 70-79, C; 60-69, D; 0-59, F student.txt file Johnson 85 83 77…
Q: Rewrite the following program by using a for loop instead of the while loop.…
A: In for loop, you can have initialization, condition, updation in single line
Q: Write a java program which asks the user to enter name and age and calls the following methods: a.…
A: Actually, the answer has given below:
Q: In this lab, you are asked to implement two methods, power and factorial, and then test these…
A: public class Main{public static void main(String[] args) { System.out.println(power(5,4));//testing…
Q: You are required to write a code that requires the user to enter positive integer numbers…
A: As per the given question, given numbers, we need to print maximum even number, minimum even number,…
Q: Write a program, named last10.java, whose input is an unknown number of integers. The program stops…
A: JAVA PROGRAM: import java.util.*; class Main { public static void main(String args[]) {…
Q: Write a program for a game that consists of two players. The rule of the game is that player 1…
A: For the above problem, I am going to provide a solution in python.
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: 2. What is the output? Show work. When done, run the program. Did you get the same output? class…
A: answer is
Q: Write a program that prompts the user to input three positive angle values in degrees to determine…
A: - We need to code for the triangle program.
Q: Write a program with a method named isEven that accepts an int argument. The method should return…
A: Program: import java.util.Random; public class CountEven { public static boolean isEven(int…
Q: How do you make this code in java, that it adds a point for each question answered or doesn't give a…
A: As per the given question, 3 questions are being asked. If the input to the question from user is…
Q: I need to write a JAVA program that will allow me to insert "movies.csv" and output "Wonders of the…
A: Java Programming code for the given problem is given in step 2
Q: public static int test(int n, int k) { if (k == 0 || k == n) { return 1; } else if (k>n) { return 0;…
A: The implementation that corresponds to recursion is this. The outcome will be 1 if indeed the value…
Q: What is the probability that in a classroom of x people, at least 2 will be born on the same day of…
A: Problem: Probability of having atleast 2 people birthday on the same day through simulating 10000…
At a coffee shop , a coffee cost $1. Each coffee you purchase, earns one star. Seven stars earns a free coffee. In turn, that free coffee earns another star. Ask the user how many dollars they will spend, then output the number of coffees that will be given and output the number of stars remaining. Use A loop. Please Write the code in Java and use the test case examples as reference.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- $aprintKroger Co., a large nationwide grocery chain, maintains a customer reward system titled the “Kroger Plus” card. Customers who enroll in this system are entitled to discounts on products at Kroger stores and on gasoline. To earn discounts and other rewards, the shopper must use the “Kroger Plus” card at the time of checkout. The card has a bar code that identifies the customer. This system allows Kroger to determine customer buying patterns and to use the data for data mining. Using a Web search engine, search for “data mining” and “grocery.” In a one (1) page response, describe what types of information grocery stores collect that they can use for data mining purposes. Also, describe how grocery chains use data mining to improve performance.The following table shows the rate of commission that will be paid to the salesman according to the total sales performance of the month:Total Sales Performance (RM) CommissionLess than 10000 No commission10000 – 20000 1% of the total sales20001 – 30000 2% of the total sales30001 – 40000 3% of the total salesMore than 40000 4% of the total sales Lastly, display the salesmanName, totalSalesPerformance,totalCommission and totalSalary.
- Barnhill Fastener Company runs a small factory. The company employs workers who are paid one of three hourly rates depending on skill level: Skill Level Hourly Pay Rate ($) 1 17.00 2 20.00 3 22.00 Each factory worker might work any number of hours per week; any hours over 40 are paid at one and one-half times the usual rate. In addition, workers in skill levels 2 and 3 can elect the following insurance options: Option Explanation Weekly Cost to Employee 1 Medical Insurance 32.50 2 Dental Insurance 20.00 3 Long - term disability insurance 10.00 Also, workers in skill level 3 can elect to participate in the retirement plan at 3% of their gross pay. Write an interactive Java payroll application that calculates the net pay for a factory worker. The program prompts the user for skill level and hours worked, as well as appropriate insurance and retirement options for the employee’s skill level category. The application displays: (1) the hours worked, (2) the hourly…Barnhill Fastener Company runs a small factory. The company employs workers whoare paid one of three hourly rates depending on skill level:Each factory worker might work any number of hours per week; any hours over 40are paid at one and one-half times the usual rate.In addition, workers in skill levels 2 and 3 can elect the following insurance options: Skill Level Hourly Pay Rate ($)1 17.002 20.003 22.00 Option Explanation Weekly Cost to Employee ($)1 Medical insurance 32.502 Dental insurance 20.003 Long-term disability insurance 10.00 Exercises 295Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent…A bank locker system has one lock and three keys.O=1, indicates the Owners key is open.M=0,indicates the Managers key is off.N=1, indicates the Nominees key is openL=0 means the locker is off.The locker(L) can be open only for the following conditions:If the Manager’s key and nominee’s keys are open but the owner key is close. ORIf the Manager’s and owner’s keys are open but the other key is close. ORIf the Owner’s key is open but the other keys are close. ORIf all keys are open.i. Find the Boolean function for the above systems outputs 2ii. Simplify the output functions using Boolean Algebra. 22.
- 1. Deternine the váue of total total=0 totalFtotal Answer: b Determine the walue oftotal total 0 tetal=total 2 Answer; Deterae the vaue of total total 0 for dont #101ont=15 icpt=1cnt +1)| total =total E, Answer: | Determine the value o total totall# D0 botal=tota Answer: Determine the valne of total total total # total 2. Answer:1. Which of the following is NOT equivalent to the statement "All UST students are smart" A. If the student is not smart then the student is not from UST. B. If the student is smart then the student is from UST. C. No UST student is not smart. D. If a student is from UST then the student is smart. 2. Which of the following is NOT equivalent to the statement "No UST student cheat" A. All UST students don't cheat. B. The student is from UST if and only if the student doesn't cheat. C. If the student is from UST then the student doesn't cheat. D. If the student cheats then the student is not from UST.pleaseUsing the below table, Fill in the regrettable Success Moderate Success Failure Sell Company 150 150 150 Form Joint Venture 500 593.00 131.00 Sell Software on own 887.00 400 -500 Regret Table Success Moderate Success Failure Sell Company Form Joint Venture Sell Software on own Based on the MiniMax Regret Method, what is the value for the Decision Alternative Sell company Submit Answer format: Number: Round to: 2 decimal places.
- Based on the description given below, draw a complete flowchart for a program develop for Cyberia Mart, to take orders from customer. • Set all necessary variables. • Ask if customer is an existing customer of the mart o If existing customer, they will get exemption from 6% tax. Get customer's item name, quantity and price of the item. Ask if customer would like to have delivery. Delivery charges for quantity under 10 is $2.00, for quantity equal to 10 or more delivery is $5.00. If the quantity is more than 10, additional $6.00 will be added at the delivery charge for safety box wrapping. • Calculate the total and grand total. • Display the Item name, quantity, delivery and total. Repeat as long as customer wish to add other item. If user wish to stop add item, calculate the tax amount and total price plus tax. • Display the total price, tax amount and total price after add with tax. Refer to Sample Output 1 and Sample Output 2 below. SAMPLE OUTPUT 1: **************…Barnhill Fastener Company runs a small factory. The company employs workers who are paid one of three hourly rates depending on skill level Skill Lovel Hourly Pay Rate ($) 17.00 2 20.00 3 22.00 Each factory worker might work any number of hours per week; any hours over 40 are paid at one and one-half times the usual rate. In addition, workers in skill levels 2 and 3 can elect the following insurance options: Option Explanation Weekly Cost to Employee ($) 1 Medical insurance 32.50 2 Dental insurance 20.00 Long-term disability insurance 10.00 3.Ask the user for the name? Ask the user to input five test scores and calculate the total of the test scores and Average of the test Scores. Using the following 10-point grading scale for the average tests score, display the grade and reward the gift certificate using the formula. Average testscore Grade Gift Certificate formula 90 and above A 120% of average testscore 80–89 B 60% of average testscore 70–79 C 20% of average testscore 60–69 D 0% of average testscore Please display Name of the user, five test scores, total, Average test score, Grade and the Gift Certificate amount based on above user input and calculations. programming language - Python