Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My 3 friends would like to purchase a 40' sailboat and then sail to Mexico and hang out in San Carlos for one year. Please

My 3 friends would like to purchase a 40' sailboat and then sail to Mexico and hang out in San Carlos for one year. Please calculate and display the cost of purchase and preparation for one year of travel.

Initial costs for sailboat:

Sailboat: $20,000.00

Sales Tax: =price of boat X .0775

Registration: 45.55

Insurance: =price of boat X .01 + 566.88

Preparation for trip:

Haul and paint bottom: = length of boat X 45

New head sail: 2,300.00

Life raft: 3,800.00

Food Provisioning = number of friends X 1250

Diesel: 760.00

Medical Kit: 666.80

----------------------------

Write a program that does the following:

1. Declare a variable for each cost and assign the appropriate value or an expression to calculate the value.

2. Declare a variable for total initial-cost-of-sailboat and assign it an expression that sums up all the initial costs.

3. Declare a variable for total preparation-costs and assign it an expression that sums up all the preparation costs.

4. Declare a variable for total costs and assign it an expression that sums up initial and total costs.

4. Display all the separate costs, the two partial costs and the total. You must use the variables in the output lines, not just type in the numbers.

Programming Notes:

1. Make sure to use the proper data type for each variable.

2. Make the display look neat and professional. Label each expense. (Don't worry about rounding off the numbers to two decimal places. We will cover that in the next chapter.)

3. Remember to use good programming style - have a header that explains - use comments - use white space to make it all readable.

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

More Books

Students also viewed these Databases questions

Question

b. Where did they come from?

Answered: 1 week ago