Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4 Write a program that calculates the total price of a shirt, a hat, and a pair of shoes. The price of the hat is

4 Write a program that calculates the total price of a shirt, a hat, and a pair of shoes.
The price of the hat is 12.50
The price of the shirt is 27.00
The price of the shoes is 175.57
total = hat + shirt + shoes
Instructions for #4
Start a new program named "Outfit" containing the standard main method
Between the curly brackets of the main method
Declare and initialize four variables
myHat (To store the price of the hat)
myShirt (To store the price of the shirt)
myShoes (To store the price of the shoes)
total (To store the total)
The total should be printed on one line using the format below:
"The total price of 1 hat + one pair of shoes +1 shirt is ...."
v Add a statement that multiplies the total by 12

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

What are the basic federal employment taxes, and who pays them?

Answered: 1 week ago

Question

Solve. Find exact solutions. x + 4 = x - 4 = 2 -

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago