Write a Java
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Data Structures and Algorithms in Java
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Starting Out with Python (4th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Starting Out with C++ from Control Structures to Objects (9th Edition)
- Write a java program to simulate a car insurance We have a problem, which is calculating the insurance price at a unified price for all categories.to solve this problem I want to calculate the insurance price in addition to the factors in the uml. For example, if the individual's age is from 18-25, the insurance rate will increase by 1% over the basic price, as well as the type of car and the gender of the person who wants insurance, for example, if a man also increases 1 % and so are all the factors. If you cannot write the entire program, it is not a problem. Write at least the equations for calculating the insurance or half of the program also You can put random numbers and random prices.arrow_forwardWrite a java program to simulate a car insurance We have a problem, which is calculating the insurance price at a unified price for all categories.to solve this problem I want to calculate the insurance price in addition to the factors in the uml. For example, if the individual's age is from 18-25, the insurance rate will increase by 1% over the basic price, as well as the type of car and the gender of the person who wants insurance, for example, if a man also increases 1 % and so are all the factors. If you cannot write the entire program, it is not a problem. Write at least the equations for calculating the insurance or half of the program also You can put random numbers and random prices.arrow_forwardWrite a java program to simulate a car insurance We have a problem, which is calculating the insurance price at a unified price for all categories.to solve this problem I want to calculate the insurance price in addition to the factors in the uml. For example, if the individual's age is from 18-25, the insurance rate will increase by 1% over the basic price, as well as the type of car and the gender of the person who wants insurance, for example, if a man also increases 1 % and so are all the factors. If you cannot write the entire program, it is not a problem. Write at least the equations for calculating the insurance or half of the program also You can put random numbers and random prices.arrow_forward
- Write Pseudocode in Java for a program that uses a bag to manage a clothing store's inventory, the clothing store has 15 red shirts, 30 pairs of pants, and 26 pairs of black shoes. The program should check how many products are in the bag How many duplicate items are in the bag and how many of each item is in the bagarrow_forwardjava programmingarrow_forwardWrite a Java program that can "make change." Your program should take two numbers as input, one that is a monetary amount charged and the other that is a monetary amount given. It should then return the number of each kind of bill and coin to give back as change for the difference between the amount given and the amount charged. The values assigned to the bills and coins can be based on the monetary system of any current or former government. Try to design your program so that it returns the fewest number of bills and coins as possible.arrow_forward
- Write a FULL Java procedural program for one human player to play a “Higher or Lower” card game. In this game, each card has a value from 1..10 inclusive. There are 4 of each value in the deck, i.e., 40 cards in total. Cards are not replaced in the deck once drawn, i.e., no more than 4 of each value will be drawn. The program starts by asking the player for a target score. The game proceeds in a series of rounds with the program repeatedly drawing and showing a card from the deck to the player one at a time. Each time, it asks the player to enter "h" (higher) or "l" (lower) to guess whether the next card drawn will be higher or lower in value. The player gains a point if they guess correctly. The game continues until the player guesses incorrectly or the target score is reached. When the game ends, it prints either a "You win!" or a "Nice try, you scored …” message as illustrated below. The image provided shows two examples of the required program behaviour: (bold is keyboard input…arrow_forwardWrite a Java program for a Play-House Manager, who would like to calculate the total profit from selling tickets of the Drama. There are 3 types of tickets: Balcony (120 AED), VIP (70 AED) and Basic (40 AED). The manager has bills and salaries to pay. Therefore, the profit is equal to (incomes – expenses). last time it was wrong codearrow_forwardWrite a java program that repeatedly prompts the user to input a string starting with letters from the English alphabet. The program must stop getting input when the user inputs the string “STOP” Consider The word STOP as case insensitive (i.e. STOP = stop = Stop = Stop ….) . Then the program must display the words starting with each letter (Case-Sensitive) from the alphabet in a separate line (e.g. you need to make a new line after all words starting with a specific letter are finished. Your program must be written according to the following rules: 1- Create an array list of 52 linked lists. 2- Each linked list will have the strings starting with a specific letter each in a separate node. For example element 0 in the array list will have a linked list of the strings starting with a and element 1 in the array list will have a linked list of the Strings starting with A, element 2 in the array list will have a linked list of the strings starting with b element 3 in the…arrow_forward
- Write a Java program for a Play-House Manager, who would like to calculate the total profit from selling tickets of the Drama. There are 3 types of tickets: Balcony (120 AED), VIP (70 AED) and Basic (40 AED). The manager has bills and salaries to pay. Therefore, the profit is equal to (incomes – expenses)...arrow_forwardWrite a Java program that takes input from the user for the lengths of three sides, s1, s2, ands3, and decides if the sides of the given lengths can form a triangle. If they can, furtherdetermine if the triangle is right, acute, or obtuse.arrow_forwardWrite a program using java programing language. Write a Java class (called ShowNum) that displays the same number of asterisks (row and columns) as is input in 2 numbers. Your class should have a default constructor (number1 is 0, number2 is 0) and another constructor that inputs 2 numbers (integers). You'll need accessor methods for the numbers and a display method that displays as follows: Input: 2, 7 ******* ******* Demo the class in a client (called ShowNumClient) that allows the user to run the program as many times as they want (enter number and use display method). The user will signal with a sentinel (-1), when they want to terminate the client. Make sure that each number entered in the client is between 1 and 30.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education