Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the code plz ( java ) . Exercise 3 . Use Netbeans to solve the following java programs. Write all of your programs

I need the code plz ( java ) . Exercise 3 .
image text in transcribed
Use Netbeans to solve the following java programs. Write all of your programs in one application, but in separate java Main files. Name your application as follows: YourlD_ YourName Hw3. Once finished upload your application to the blackboard under HWO3. Exercise 01: Write a program which performs the following a) Prompts the user to enter a number (a temperature). b) Prompts the user to enter a character (one of the following: 1, or 2) which indicates the users choice of conversion. c) If the user's choice is 1, your program converts the temperature from Fahrenheit to Celsius. d) If the user's choice is 2, your program converts the temperature from Kelvin to Celsius. e) Displays the result of the conversion. Exercise 02: Write a program that prompts a user to input x-y coordinate of a point in the Cartesian plane. The program should then output a message indicating whether the point is the origin, is located in the x plane, is located in the y plane, or appear in a particular quadrant. For example: (00) is the origin (4.0) is on the x-axis (0, -3) is on the y-axis (2, 5) is in the first quadrant (2 , 3) is in the second quadrant (-3 ,-6) is in the third quadrant (5, -3) is in the fourth quadrant Exercise 03: Write a java program that calculates and prints out bills of the city water company. The water rates vary, depending on whether the bill is for home use, commercial use, or industrial use. A code of 1 means home use, a code of 2 means commercial use, and a code of 3 means industrial use. Any other code should be treated as an error. The water rates are computed as follows: Code 1: Dh 5.00 plus Dh 0.005 per galilon use Code 2: Dh 1000.00 for the first 4 million gallons used and Dh 0.0025 for each additional gallon Code 3: Dh 1000.00 if usage doesnt exceed 4 milion gallons: Dh 2000.00 if usage is more than 4 million gallons but doesn't exceed 10 million galions; and Dh 3000.00 f usage exceeds 10 million gallons. Your program should prompt the user to enter the account number (type int), the code (type int), and the gallons of water used (type double). Your program should print the input data and print the amount due for the customer

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions