Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions - Part B ( Widgets ) Create a new Project. This time you are asked to use your knowledge gained so far in PRG

Instructions - Part B (Widgets)
Create a new Project. This time you are asked to use your knowledge gained so far in PRG155 to create a program which will ask the user for two numbers, perform some calculations based on the input and display the result in a formatted fashion.
Complete your program to perform as the following example:
A-
B-
Use integer data type to store widget quantity and double type for all other values.
You will need to apply number formatting learned in the previous part so the values displayed are right-aligned as shown above, with the following formatting:
Section "A":
Section "B":
Sections "C",D" and "E":
6-characters wide
8-characters wide with 2 decimal points
14-characters wide with 2 decimal points
Program output must be positioned/formatted without using tabs or spaces, as demonstrated in part A of this lab. Currency symbol ($) is not to be displayed and values over 1000 are not to be formatted with commas.
Make sure that your code is formatted well (tabs and blank lines) and it uses a consistent and descriptive naming convention for variables. Also, apply correctly coding practices introduced in Lab 01 as far usage of 'n' with printf goes.
Test your program with varying user input making sure that all values are calculated and displayed correctly. You may adjust the "A" to "E" fields slightly to you liking, but the order summary section output must be 40-characters wide.
When you are satisfied, take a screenshot of your program output (prg155-lab3-b.png) using 12345 widgets at 0.97 each as input, making sure that your entire program code and the
Page 2
image text in transcribed

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

More Books

Students also viewed these Databases questions

Question

10. What is meant by a feed rate?

Answered: 1 week ago

Question

Have ground rules been established for the team?

Answered: 1 week ago

Question

Is how things are said consistent with what is said?

Answered: 1 week ago

Question

Do you currently have a team agreement?

Answered: 1 week ago