Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Trip to Cuba Write a Java program that produces an expense report for your trip to Cuba. The program requests your last name and converts

image text in transcribed

Trip to Cuba Write a Java program that produces an expense report for your trip to Cuba. The program requests your last name and converts the first character to uppercase and the rest of the characters to lowercase. Concatenate the last name with the string "Expense Report" to produce the title of the report. See sample display. The program then accepts the airline fare, the number of nights at the hotel, and the number of dollars you plan to convert to Cuban money. The hotel charges $256.10 per night. The major legal currency for Cuba is the Cuban Convertible Peso, or CUC. It's what you exchange your dollars for and make all your purchases with in Cuba. 1.00 Cuban Convertible Peso = $1.00 USD There is a 10% penalty charged when exchanging US dollars plus a 3% currency exchange fee. You will need to exchange your dollars at the hotel. You cannot use American credit cards or bank cards so take sufficient dollars for the trip. Be sure to test for a variety of values. Here is a sample display with the prompts and results: Expense Input Enter your last name: adaMs Enter airline fare: Enter number of nights: 4 Enter dollars to convert: 150 473.66 Adams Expense Report Airline Fare $473.66 Hotel $1,02440 $1,498.06 Total $150.00 dollars Conversion rate $130.50 Cuban CUC -10% -396 The decimals do not need to align, but align the signs for readability. Purpose of this project: Develop Java program with the following features: Constants and variables o Input data o Calculations including totals o Output display with readable formatting Use the NumberFormat class to format the monetary values and percentages. o String class o The Payroll File in the Chapter Three Activities contains most of the syntax needed. Be sure to comply with Class Standards

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

Students also viewed these Databases questions

Question

4. What should learners revisit and remember?

Answered: 1 week ago