Answered step by step
Verified Expert Solution
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 PRG 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 rightaligned as shown above, with the following formatting:
Section A:
Section B:
Sections and :
characters wide
characters wide with decimal points
characters wide with decimal points
Program output must be positionedformatted without using tabs or spaces, as demonstrated in part A of this lab. Currency symbol $ is not to be displayed and values over 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 as far usage of 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 characters wide.
When you are satisfied, take a screenshot of your program output prglabbpng using widgets at each as input, making sure that your entire program code and the
Page
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started