Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment Task: A size (volume) of a jumbo candy bar with rectangular shape is Length x Width x Height cubic centimeters. Due to the rising

Assignment Task:

A size (volume) of a jumbo candy bar with rectangular shape is Length x Width x Height cubic centimeters. Due to the rising cost of coca, the management decided to reduce the volume of the candy bar. They decided to keep the Height the same but reduce the Length by 10% and the Width by 5%. Write a C++ program to output the following:

  • Original Length, Width, Height, and Volume of the candy bar.
  • Modified Length, Width, Height, and Volume of the candy bar. Note the Height remains unchanged.

Format your outputs to two decimal places, using fixed point notation.

Use good comments and coding style (layout) for your program. Good coding style includes using good vertical spacing between lines of code and horizontal indentation when applicable.

Include a header comment block at the top of your .cpp file, and in that, include your full name. the purpose of the program, and which compiler/IDE you have used.

You are free to use any C++ compiler/IDE you wish to use. Geany is available through Virtual Lab in Phillips 115. MS Visual Studio 2019 is available in Phillips 115.

Please submit your .cpp file on Canvas under the Assignment 2 folder. I will run your .cpp file to check for correctness and will also check for comments usage and goodness of program layout and readability.

Grading Breakdown:

  • Correctness of program? 20 points.
  • Good comments used? 5 points.
  • Good program layout? 5 points.

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_2

Step: 3

blur-text-image_3

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

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions