Write a complete Java
Note that you do not need to fully understand all the details of the program in order to write the program. You can simply follow the model of the program in Display 1.1.
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Absolute Java Plus MyLab Programming with Pearson eText -- Access Card Package (6th Edition)
Additional Engineering Textbook Solutions
Concepts of Programming Languages (11th Edition)
C++ How to Program (10th Edition)
Problem Solving with C++ (10th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Database Concepts (8th Edition)
- this is a java program Complete the given task and give the code here and screenshot of the outputarrow_forwardWrite a Java program that prints rectangles of three different sizes to the screen, with a blank line between each rectangle. A 5 x 3 rectangle made of the letter ‘O’ A 16 x 6 rectangle made of the letter ‘T’ A 2 x 4 rectangle made of the left square bracket ‘%’ In the dimensions given above the first number is the horizontal width and the second number is the vertical height of the rectangle. Here is what your output should look like. Your program should be written in a flexible, general way so that the rectangle dimensions and the letter/character used to print each rectangle can be changed easily without rewriting the whole program. OOOOO OOOOO OOOOO TTTTTTTTTTTTTTTT TTTTTTTTTTTTTTTT TTTTTTTTTTTTTTTT TTTTTTTTTTTTTTTT TTTTTTTTTTTTTTTT TTTTTTTTTTTTTTTT %% %% %% %%arrow_forwardWrite a code in Java that results like test 2&3arrow_forward
- Write a program that displays the classic BINGO game, displays a BINGO card (5x5 square), and tests the bingo card for a winner via 2 users, in Javaarrow_forward6. Write a Java program that reads the length of a scale in inches and then prints the equivalent length of the scale in centimetres.arrow_forwardWrite a program that prompts a student to enter a Java score. If thescore is greater or equal to 60, display “you pass the exam”; otherwise, display “youdon’t pass the exam”. Your program ends with input -1. Here is a sample run: Enter your score: 80 ↵EnterYou pass the exam.Enter your score: 59 ↵EnterYou don't pass the exam.arrow_forward
- Write a program in java that checks to see if the user won the lottery. Assume the winning lottery numbers are 8, 13, 27, 53, and 54. Ask the user for five numbers and compare those numbers to the winning numbers to determine how many matches the user got. In a lottery, the order of the numbers doesn't matter.arrow_forwardWrite a program In java that asks for the user's age. If the age is under 13, output, "You are a child". if age is greater than 13 and less than 19, output, "You are a teen". if age is greater than 19 and less than 65, output, "You are an adult". Over 65, "You are a senior citizen".arrow_forwardin Java Write a program that establishes two savings accounts with saver1 having account number10002 with an initial balance of $2,000, and saver2 having account 10003 with an initialbalance of $3,000. Set a common rate of interest at 5% per year. At the end of each month,update the balance by adding one month’s interest to the balance, so that the balancecompounds monthly. Print an output that displays the month number and the account numberand the balance for each of the two accounts. Use month 0 to display the initial balances, month1 to display the balances after the first month’s interest, and so on. At the end of the year,display the total balance for both accounts combined, like this:Output:Monthly balances for one year with 0.05 annual interest:Month Account # Balance Account # Balance----- --------- ------- --------- ------- 0 10002 2000.00 10003 3000.00 1 10002 2008.33 10003 3012.50 2 10002 2016.70 10003 3025.05 3 10002 2025.10 10003 3037.66 4 10002 2033.54 10003 3050.31 5…arrow_forward
- Write a java program that reads from the keyboard the starting positions and constructs the rest of the magic triangle based on those integer numbers. Output to the screen the completed magic triangle in the form of a triangle shape and the number all the sides equal to. Depending on the inputs there may be several possible solutions. In that case, any solution will do. In a few cases there may be no solution, in which case output "No solution". Finally, the program should ask if the user wants to run the program again. Check case. Refer to the sample output below. Sample Run: Enter the three triangle starting positions: 2 7 8 Completed triangle: 5 8 9 1 2 6 7 3 4 All sides total: 20 Run again (Y/N): y Enter the three triangle starting positions: 5 2 7 No solutionRun again (Y/N): Narrow_forwardWrite a program that prompts a student to enter a Java score. If the score is greater or equal to 60, display “you pass the exam”; otherwise, display “you don’t pass the exam”. Your program ends with input -1.arrow_forwardWrite a java program that can suggest an activity based on the temperature. If the temperature is between 20 to 40 degrees Fahrenheit, suggest the user go skiing; if the temperature is between 41 to 60 degrees Fahrenheit, suggest the user go hiking; if the temperature is in the range of 61 to 80, suggest swimming. For all the temperatures out of these ranges (too cold or too hot), then suggest staying inside.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