A client in a store is buying 5 items: shirt, trouser, hat, shoes, and perfume. Write a program that asks for the price of each item, then displays the sub-total of the sale, the amount of sales TAX, and the final total amount. Assume that the sales TAX is 7 percent (i.e. 7%). Hint: The subtotal is the addition of the prices of all items acquired, the sales tax amount is obtained by multiplying the subtotal times the tax/100 and the total amount value is found by adding the subtotal value and the sales tax value. NOTE: Make sure that it takes 2 numbers after the decimal point. Sample Run Enter the price of shirt: 23.54 Enter the price of trouser: 10.43 Enter the price of hat: 11.20 Enter the price of shoes: 20.42 Enter the price of perfume: 32.98 Subtotal: $98.57 Sales Tax: $6.90 Total: $105.47
Q: Write a program in java to accept basicpay,hra, from the employee. Calculate grosspay which is…
A: Given:
Q: Write a program that takes a first name as the input, and outputs a welcome message to that name Ex:…
A: Code : import java.util.Scanner; public class LabProgram { public static void main(String[]…
Q: Write a program that asks a user to enter a first name, a last name, and a year, and construct an…
A: As the language is not specified answer written in python
Q: s shown in the Figure. (Hint: A point is in the rectangle if its horizontal distance to (0, 0) is…
A: Analysis of the problem: There is a rectangle with vertices a,b,c,d(let). The position of the…
Q: You are asked to write a java program to prepare for the Lebanese parliament elections. Your program…
A: The program ask user to enter his name, age and gender. If the age entered by the user is less than…
Q: Write a java program that helps the Lebanese scout to create an online tombola (lottery). Your…
A: import java.lang.Math;import java.util.Scanner;public class Main{ public static void main(String[]…
Q: write a java program A twin prime is a prime number that is either 2 less or 2 more than another…
A: I have given an answer in step 2.
Q: Write a application that recites a usual of numbers, and then bargains and designs the amount of the…
A: The major difference between these anova is that only mean effect is tested in one way ANOVA whereas…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: Actually, the code has given below:
Q: Write a console application that prints the next 20 leap years. A leap year is a year in which an…
A: CURRENT_YEAR = 2021NOF_LEAP_YEARS = 20 # Functionsdef is_leap_year(year): if year % 4 > 0:…
Q: Write a java application for an Auto Car shop that shows a user a list of available services: oil…
A: The code is given below.
Q: Write a program that prompts for name and salary of an employee. Here the salary will denote an…
A: required: Write a program that prompts for the name and salary of an employee. Here the salary will…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: Actually, the code has given below:
Q: Write a program that prompts the user to enter adecimal number and displays the number in a…
A: Program code: filename: BigRational.java //import the required packages import…
Q: A company wants to secure users' passwords that consists of four digits only by encrytping them.…
A: The programming methodology for the program is given by: Including header files Function prototype…
Q: For Java Write an application that prompts the user for a password that contains at least two…
A: Java Program: /* // Java Program to check the validity of a Password */import java.util.Scanner;…
Q: dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as…
A: Q. Write a program that plays a dice game called "21"
Q: Write a program that models 2 vehicles (Car and Truck) and will be able to simulate driving and…
A: This is an object oriented programming concept in which concepts like inheritance, polymorphism are…
Q: Write a client program for MyTime which loops around getting strings from the user representing…
A: Actually, Java is a programming language originally developed by James Gosling at Sun Microsystems…
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: By looking at this formula, F=9/5C+32, it can be used to convert Celsius temp to Farenheight. Write…
A: According to Question below the Solution: Output:
Q: Write a java program that prompts the user to enter two integers, intLeft and intRight, taking into…
A: public static Scanner scan = new Scanner(System.in); declare scan object for taking input…
Q: Write a program that moves a forester unit and a desert corps unit to a given target location and…
A: Answer : #include <iostream> #include <math.h> #include <string.h> using namespace…
Q: In Java ,write a program that will act like an Bank Management app. In order to access the app, the…
A: package bankmanagement; public class User { //declaring instance variables private long userId;…
Q: Write a program that prompts the user for a sentence and display in new words. Your program should…
A: Below I have provided C++ Programming. Also, I have attached the screenshot of the code and output…
Q: Write a program that prompts the user for a sentence and display in new words. Your program should…
A: Here is the c++ code of the program. See below step for code.
Q: Write a Java program called IntCheck that examines the integer variable x, printing GT (greater…
A: // Defining the Main Classpublic class Main{ // Function to check the Number x public void…
Q: Using Java programming language write a program to manage a hotel with 24 rooms; 10 rooms are…
A: Given 10 rooms are Executive, with price Gh ₵ 2500.00 per night,7 rooms are Chalets, with amounts…
Q: Write a program in java which display the burger Sizes and its prices in tabular form as display…
A: Required: Write a program in java which display the burger Sizes and its prices in tabular form as…
Q: Write a program in Java to generate the entire calendar for one year. The program must get two…
A: the program is given below:-
Q: You are asked to write a java program to prepare for the Lebanese parliament elections. Your program…
A: I give the code in Java along with output and code screenshot
Q: that reads a line of text, tokenizes the line using space characters as delimiters and outputs only…
A: Code: import java.util.*; class Main { public static void main(String[] args) { Scanner in=new…
Q: Question 2: Write a java program that prompt the user for a string telephone number of the form…
A: According to the Question below the solution: Output:
Q: Write a program that moves a forester unit and a mountaineer unit to a given target location and…
A: Given:-
Q: write a program in c++ in which A Paint Company has asked you to write an application that…
A: Note: Formula for calculating the area of a room is considered as length * width. area = length *…
Q: Using Java.. Write a program that reads the user's first name and last name, and then use them to…
A: Given data, Write a program that reads the user's first name and last name, and then use them to…
Q: Write an java application that allows a user to enter any number of student quiz scores, as…
A: Program: import java.util.*; class Main { public static void main(String args[]) { Scanner sc =…
Q: Write a program that models 2 vehicles (Car and Truck) and will be able to simulate driving and…
A: GIVEN Write a program that models 2 vehicles (Car and Truck) and will be able to simulate driving…
Q: Write a Java program correctly that generates a report of proof of vaccination against COVID-19 for…
A: We need to write Java program for given specifications.
Q: Write a Java program correctly that generates a receipt for a delivery company, called “Montréal…
A: Here is the code:(montrealExpress.java) import java.util.Scanner; public class montrealExpress{…
Q: In Java, is there a simple way of doing this without having to use so many If statements? please…
A: Given :- In Java, is there a simple way of doing this without having to use so many If statements?…
Q: I need to make an ATM program that allows the user to check his or her balance after entering his or…
A: Python Code: import randomimport sys class ATM(): def __init__(self, name, account_number,…
Q: Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the…
A: Q. Write a program that plays a dice game called "21" It is a variation on BlackJack where one…
Q: reate a java program that calculates the average test scores. Three employees in a company are ups…
A: Create a java program that calculates the average test scores. Three employees in a company are ups…
Q: Using Java programming language write a program to manage a hotel with 24 rooms; 10 rooms are…
A: It is defined as
Q: IN C++ Create a task that takes a series of card numbers and checks that their total value is more…
A: Please refer below code and output: Language used is C++: #include <iostream>using namespace…
Q: Create a java program that calculates the average test scores. Three employees in a company are ups…
A: Java Code: import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import…
Q: Write a program that prompts the user for a sentence and display in new words. Your program should…
A: Answer // C++ program that prompts the user for a sentence and display in new words. // Header file…
Q: in Java, Write a program that reads student scores, gets the best score, and then assigns grades…
A: Java program to determine the grade of a student corresponding to the score. Prompt user to enter…
Q: You are asked to write a java program for an embassy to help with the visa process. Your program…
A: I give the code in Java along with output and code screenshot
Step by step
Solved in 4 steps with 2 images
- Assignment Write a program that moves a forester unit and a desert corps unit to a given target location and prints the number of hours it took for each unit to reach the target. First, the user will give the starting X and Y positions of the forester unit as well as its base speed (all ints). Then, the starting X and Y positions of the desert corps unit as well as its base speed (all ints). Finally, the target X and Y positions (both ints) and the terrain type (std::string). Speeds are given as distance traveled in one full day (i.e., 24 hours) and is affected by the terrain type using a multiplier over the base speed. Also, after 1 full day, each unit rests for a certain number of hours. Speed multiplier and rest amount of each type of unit depending on the terrain type are as below. Speed Multiplier Rest Duration After 1 day Terrain type Forester Desert Corps Forester Desert Corps Forest 1.3 0.6 4 12 Desert 0.4 1.2 15 6 Hills 0.7 0.8 6 8 Others 1.0 0.8 8 6 After getting all this…Question Using Java programming language write a program to manage a hotel with 24 rooms;10 rooms are Executive, with price Gh ₵ 2500.00 per night,7 rooms are Chalets, with amounts Gh ₵ 1500.00 per night7 rooms are Ordinary, with amount Gh ₵ 500.00 per night The program should allow customers to book for rooms for a number of nights, and update the number of empty rooms available for each category when a customer has paid fully and has checked-in; also update the number of empty rooms available when customer checks-out.Customers should make bookings with their first names, telephone number A customer should be prompted to know if a room is booked (meaning a another customer has booked it but has not paid fully, or has not checked-in) A customer should be prompted to know if a room is occupied (meaning a booked room has been fully paid for, or the customer has checked-in) A customer should be prompted to know if a room is available (meaning a room has neither been booked nor…An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insurance Note: Use switch cases when you check the total number of accidents.
- The company « Super discounted used cars inc.» pays their employees according to this chart: 250$ per months plus 50$ per car sold. If the salesman sells more than 10 cars, the employee receives a bonus of 5% of the total of his sales, in addition to his regular salary. Each month, the owner sits in front of the computer, and enters the following information: The name of the employee, the number of cars sold, as well as the total of all the sales for the month. Write an algorithm that will calculate the salary of an employee for the month, and then display on the screen, his name, total cars sold, base salary, bonus if applicable and entire salary.An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insuranceThe company « Super discounted used cars inc.» pays their employees according to this chart: 250$ per months plus 50$ per car sold. If the salesman sells more than 10 cars, the employee receives a bonus of 5% of the total of his sales, in addition to his regular salary. Each month, the owner sits in front of the computer, and enters the following information: The name of the employee, the number of cars sold, as well as the total of all the sales for the month. algorithm that will calculate the salary of an employee for the month, and then display on the screen, his name, total cars sold, base salary, bonus if applicable and entire salary. Each input must be validated.and make trace memory screen
- In C++ language, create a program that gets quarterly sales from a user, and calculates the total of all four quarters as well as the average, lowest, and highest quarters. Console Example that should be used/followed when executed The Quarterly Sales program Enter sales for Q1: 12312.57 Enter sales for Q2: 15293.21 Enter sales for Q3: 14920.95 Enter sales for Q4: 23432.21 Total: 65958.94 Average Quarter: 16489.74 Lowest Quarter: 12312.57 Highest Quarter: 23432.21 Specifications: Create the pseudocode needed to implement the solution above. Convert your pseudocode to C++ code including the following specifications: Round the average quarter to a maximum of 2 decimal digits. Use a vector to store the sales for each quarter. Use STL algorithms to process the data for the quarters. Please make sure the average is ROUNDED 2 places to get the output 16489.74 instead of 16489.73This is python3 code pleaseDevelop a catalog for a company. Assume that this company sells three different Items. The seller can sell individual items or a combination of any two items. A gift pack is a special combination that contains all three items. Here are some special considerations: 1- If a customer purchases individual items, he does not receive any discount.2- If a customer purchases a combo pack with two unique items, he gets a 10% discount. 3-If the customer purchases a gift pack, he gets a 25% discount. Write a function for the above scenario. Perform the calculations in code wherever applicable. The function should be your own creation, not copied from any other source. The final output should look like the image attached.Include the following in your submission: The code for the function that you created. The output of the code. A description of what feature(s) your function illustrates. The code and its output must be explained technically. The explanation…Design a program to do the administration for a fun run competition. Participants can run a distance of 5 kilometers, 10 kilometers or 15 kilometers. Ask the user if they wish to register a participant (Y or N). Ask whether the person is a member (Y or N)Ask the distance that the person wishes to run (5, 10, 15). Registration fees for club members are as follows:5km = R 65.0010km = R 100.0015km = R 150.00 Non-members:For the 5 and 10 kilometers distances, the participation fees must be increased by 25%For the 15 kilometer distance the registration fee is double that of club members. Use the given criteria and input information to calculate the registration fee. The program must keep track of the total number of participants per distance category, the total amount received per distance category and total amount received.The program must also calculate the total number of participants and the total number of club members who registered.The program must identify the category with the…
- In C++ language, create a program that gets quarterly sales from a user, and calculates the total of all four quarters as well as the average, lowest, and highest quarters. Console Example The Quarterly Sales program Enter sales for Q1: 12312.57 Enter sales for Q2: 15293.21 Enter sales for Q3: 14920.95 Enter sales for Q4: 23432.21 Total: 65958.94 Average Quarter: 16489.74 Lowest Quarter: 12312.57 Highest Quarter: 23432.21 Specifications: Create the pseudocode needed to implement the solution above. Convert your pseudocode to C++ code including the following specifications: Round the average quarter to a maximum of 2 decimal digits. Use a vector to store the sales for each quarter. Use STL algorithms to process the data for the quarters.Design a program to do the administration for a fun run competition. Participants can run a distance of 5 kilometers, 10 kilometers or 15 kilometers. Ask the user if they wish to register a participant (Y or N).Ask whether the person is a member (Y or N)Ask the distance that the person wishes to run (5, 10, 15). Registration fees for club members are as follows:5km = R 65.0010km = R 100.0015km = R 150.00 Non-members:For the 5 and 10 kilometers distances, the participation fees must be increased by 25%For the 15 kilometer distance the registration fee is double that of club members. Use the given criteria and input information to calculate the registration fee.The program must keep track of the total number of participants per distance category, the total amount received per distance category and total amount received.The program must also calculate the total number of participants and the total number of club members who registered.The program must identify the category with the…Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints? ≤ ? ≤ ???? ≤ ?, ? ≤ ???? ≤ ? ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…