Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

x' l A.. .. |1| -|. | 2 . . | | Emphasis Heading 1 L Normal] Strong nt Paragraph Styles Write complete programs for

image text in transcribed
x' l A.. .. |1| -|. | 2 . . | | Emphasis Heading 1 L Normal] Strong nt Paragraph Styles Write complete programs for all the problems and compile, run and make sure that the program works correctly. Save the project and hand in a paper copy of the program 1. Write a java program that inputs three double numbers from the keyboard and computes and display their sum, product, and average. The following a sample output that shows the screen output. (save the project as Ass1 Pl) Enter first number. 2.5 Enter second number 4.5 Enter third number: 2.6 Sum is 9.6 Product is 29 25 Average is 3.2 2. Write a program that computes the tax and tip on a restaurant bill The program should ask the user to enter the charge for the meal. The tax should be 6.75 percent of the meal charge. The tip should be 15 percent of the total after adding the tax. Program should display the meal charge. tax amount, tip amount, and the total bill on the screen. The following a sample output (save the project as Assl P2) What is the meal charge? $45.50 Final bill: Meal charge: $45.50 Tax amount: $3.07 Tip amount: $7.29 Total bill: $55.86 3. Write a Java program that asks the user to enter the name of his or her favorite city. Use a string varliable to store the input. The program should display the following (save the project as Assi P3) a) The number of characters in the city name. b) The name of the city in all uppercase letters c) The name of the city in all lowercase letters d) The first character in the name of the city Readinput-Net8 Wssignment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

ISBN: B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

1. What are the pros and cons of diversity for an organisation?

Answered: 1 week ago

Question

1. Explain the concept of diversity and equality in the workplace.

Answered: 1 week ago