Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 03) Write a Java program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight
Question 03) Write a Java program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds. Output both the weights rounded to two decimal places. (Note that 1 kilogram = 2.2 pounds.) Format your output with two decimal places. [Hint: Use the System.out.printf method] Question 04) A cinema owner decides to donate a portion of their income to a local charity for each movie. Create a console Java program to calculate the amount to be donated to charity. Your program should use inputData.txt file to input the following: 1) The movie name, 2) The ticket price, 3) The number of tickets sold, and 4) The percentage to be donated. inputData.txt Titanic 14 250 7.50 The program should compute the amount to be donated. After that your program should store the output in "donations.txt" file as well as display the output on the console as shown below: Movie: Titanic Total Sales: 3500.00 Total Donations: 262.50
Step by Step Solution
★★★★★
3.46 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
Question 03 java import javautilScanner public class WeightConverter public static void mainString a...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started