Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sweater Store - Mini Project You are shopping for a new sweater. Before visiting the store, you read on their website that the sweater

image

Sweater Store - Mini Project You are shopping for a new sweater. Before visiting the store, you read on their website that the sweater you like comes in five colours: black, red, brown, white, and a colour of your choice. All sweaters cost $40.00 (this amount already includes tax). Write a program that asks the user to type in a sweater colour from the available five choices. Make sure to tell the user what the five choices are. Also, ask the user how much cash they currently have available. If black or white is selected, output "You have enough sweaters in this colour." If red or brown is selected, output "Sorry, we are out of that colour." If the colour of your choice is selected, AND the user has at least $40.00 available, output "Good choice!" If the colour of your choice is selected and the user does not have enough cash, output "Sorry, you do not have enough cash available to make this purchase." Otherwise, if the user types in any other colour, output "We do not sell that colour sweater." Remember to include //comments and a /** header */ with your code. You must use logical operators in your program

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

Statistical Techniques In Business And Economics

Authors: Douglas Lind, William Marchal

16th Edition

78020522, 978-0078020520

More Books

Students also viewed these Programming questions

Question

Will something truly bad happen if I dont follow this value?

Answered: 1 week ago

Question

What do you suppose influences the last-minute swings of people?

Answered: 1 week ago