Instructions Download or clone workshop 6 (W506) from https://github.com/Seneca-144100/PC-Workshops Note: If you use the download option, make sure you EXTRACT the files from the zip archive file 1. Carefully review the "Part-1 Output Example" (next section) to see how this program is expected to work 2. Code your solution to Part-1 in the provided "wep1.c" source code file 3. Begin by prompting the user for their NET monthly income • The monthly income must be at least $500.00, and not more than $400,000.00 • The minimum and maximum values should be stored in unmodifiable variables and used in the validation logic accordingly Display an appropriate error message if the entered value is outside this range • Validation must be nested in an iteration construct and repeat until a valid value is entered 4. Next, prompt the user to specify the number of wish list items they want to use in the forecast Note The maximum number of items should be limited to 10 (define a macro to help with this) Display an appropriate error message if the entered value is outside this range • Validation must be nested in an iteration construct and repeat until a valid value is entered 5. Now you are ready to store the wish list item details. Use an iteration construct to iterate the number of times necessary to obtain the number of wish list item details specified by the user (from step #4) 6. The item details are made up of three (3) related pieces of information and must be stored in matching (parallel) arrays a) Cost - A double floating-point value representing the value of the item The entered value must be at least $100.00 (use an unmodifiable variable to help with the validation logic accordingly) Display an appropriate error message if the entered value is invalid Validation must be nested in an iteration construct repeating until a valid value is entered b) Priority An integer value representing the priority of the item The entered value must be between 1 and 3 inclusive where o 1-a must-have item o2important to have item o 3 want to have item Display an appropriate error message if the entered value is out of range Validation must be nested in an iteration construct repeating until a valid value is entered c) Finance Options - A character value representing if an item has financing options (don't need to pay entire value up-front) The entered value can only be a lowercase y or n Display an appropriate error message if the entered value is not a y or n Validation must be nested in an iteration construct repeating until a valid value is entered 7. After storing the data to parallel array's, display a formatted table of the data entered • Use the following printf statements for the table header printf("Item Priority Financed printf("... • Use the following printf formatting to display each wish list item record: printf("%3d %5d X5c X11.21\n", Cost\n"); --------\n"); 8. After all the data is displayed, summarize it with the total of all the item costs. Use the following printf statement to properly align it with the appropriate Cost column: printf(" -\n"); printf(" $11.21f\n\n", ... 9. Finally, before ending the application, display an exit message

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Part-1 Output Example (Note: Use the YELLOW highlighted user-input data for submission)
Wish List Forecaster
Enter your monthly NET income: se
ERROR: You must have a consistent monthly income of at least $500.00
Enter your monthly NET income: $seeeee
ERROR: Liar! I'll believe you if you enter a value no more than $480000.00
Enter your monthly NET income: $6500.50
How many wish list items do you want to forecast?: @
ERROR: List is restricted to between 1 and 18 items.
How many wish list items do you want to forecast?: 11
ERROR: List is restricted to between 1 and 10 items.
How many wish list items do you want to forecast?: 3
Item-1 Details:
Item cost: $39030.15
How important is it to you? [1-must have, 2-important, 3-want]: @
ERROR: Value must be between 1 and 3
How important is it to you? [1-must have, 2-important, 3-want]: 4
ERROR: Value must be between 1 and 3
How important is it to you? [1-must have, 2-important, 3-want]: 1
Does this item have financing options? [y/n]: N
ERROR: Must be a lowercase 'y' or 'n'
Does this item have financing options? [y/n]: Y
ERROR: Must be a lowercase 'y' or 'n'
Does this item have financing options? [y/n]: k
ERROR: Must be a lowercase 'y' or 'n'
Does this item have financing options? [y/n]: n
Item-2 Details:
Iten cost: $99.99
ERROR: Cost must be at least $100.00
Item cost: $1200000
How important is it to you? [1-must have, 2-important, 3-want]: 3
Does this item have financing options? [y/n]: y
Item-3 Details:
Item cost: $350500.25
How important is it to you? [1-must have, 2-important, 3-want]: 2
Does this item have financing options? [y/n]: n
Item Priority Financed
1
2
3
1
3
2
39030.15
1200000.00
350500.25
$ 1589530.40
Best of luck in all your future endeavours!
Cost
n
y
n
Transcribed Image Text:Part-1 Output Example (Note: Use the YELLOW highlighted user-input data for submission) Wish List Forecaster Enter your monthly NET income: se ERROR: You must have a consistent monthly income of at least $500.00 Enter your monthly NET income: $seeeee ERROR: Liar! I'll believe you if you enter a value no more than $480000.00 Enter your monthly NET income: $6500.50 How many wish list items do you want to forecast?: @ ERROR: List is restricted to between 1 and 18 items. How many wish list items do you want to forecast?: 11 ERROR: List is restricted to between 1 and 10 items. How many wish list items do you want to forecast?: 3 Item-1 Details: Item cost: $39030.15 How important is it to you? [1-must have, 2-important, 3-want]: @ ERROR: Value must be between 1 and 3 How important is it to you? [1-must have, 2-important, 3-want]: 4 ERROR: Value must be between 1 and 3 How important is it to you? [1-must have, 2-important, 3-want]: 1 Does this item have financing options? [y/n]: N ERROR: Must be a lowercase 'y' or 'n' Does this item have financing options? [y/n]: Y ERROR: Must be a lowercase 'y' or 'n' Does this item have financing options? [y/n]: k ERROR: Must be a lowercase 'y' or 'n' Does this item have financing options? [y/n]: n Item-2 Details: Iten cost: $99.99 ERROR: Cost must be at least $100.00 Item cost: $1200000 How important is it to you? [1-must have, 2-important, 3-want]: 3 Does this item have financing options? [y/n]: y Item-3 Details: Item cost: $350500.25 How important is it to you? [1-must have, 2-important, 3-want]: 2 Does this item have financing options? [y/n]: n Item Priority Financed 1 2 3 1 3 2 39030.15 1200000.00 350500.25 $ 1589530.40 Best of luck in all your future endeavours! Cost n y n
Part-1 (10%)
Instructions
Download or clone workshop 6 (WS06) from https://github.com/Seneca-144100/PC-Workshops
Note: If you use the download option, make sure you EXTRACT the files from the zip archive file
1. Carefully review the "Part-1 Output Example" (next section) to see how this program is expected to work
2. Code your solution to Part-1 in the provided "w6p1.c" source code file
3. Begin by prompting the user for their NET monthly income
• The monthly income must be at least $500.00, and not more than $400,000.00
• The minimum and maximum values should be stored in unmodifiable variables and used in the validation logic
accordingly
• Display an appropriate error message if the entered value is outside this range
• Validation must be nested in an iteration construct and repeat until a valid value is entered
4. Next, prompt the user to specify the number of wish list items they want to use in the forecast
Note
• The maximum number of items should be limited to 10 (define a macro to help with this)
• Display an appropriate error message if the entered value is outside this range
• Validation must be nested in an iteration construct and repeat until a valid value is entered
5. Now you are ready to store the wish list item details. Use an iteration construct to Iterate the number of times
necessary to obtain the number of wish list item details specified by the user (from step #4)
6. The item details are made-up of three (3) related pieces of information and must be stored in matching (parallel)
arrays:
a) Cost
- A double floating-point value representing the value of the item
-The entered value must be at least $100.00 (use an unmodifiable variable to help with the validation logic
accordingly)
Display an appropriate error message if the entered value is invalid
Validation must be nested in an iteration construct repeating until a valid value is entered
b) Priority
An integer value representing the priority of the item
- The entered value must be between 1 and 3 inclusive where:
o 1-a must-have item
o 2 important to have item
o 3 want to have item
Display an appropriate error message if the entered value is out of range
Validation must be nested in an iteration construct repeating until a valid value is entered
c) Finance Options
- A character value representing if an item has financing options (don't need to pay entire value up-front)
The entered value can only be a lowercase y orn
Display an appropriate error message if the entered value is not a y or n
Validation must be nested in an iteration construct repeating until a valid value is entered
7. After storing the data to parallel array's, display a formatted table of the data entered
• Use the following printf statements for the table header.
printf("Item Priority Financed
printf("----
Cost\n");
----\n");
• Use the following printf formatting to display each wish list item record:
printf("%3d %5d x5c %11.21f\n", ...
8. After all the data is displayed, summarize it with the total of all the item costs. Use the following printf statement
to properly align it with the appropriate Cost column:
printf("
printf("
--\n");
$11.21f\n\n",
9. Finally, before ending the application, display an exit message
Transcribed Image Text:Part-1 (10%) Instructions Download or clone workshop 6 (WS06) from https://github.com/Seneca-144100/PC-Workshops Note: If you use the download option, make sure you EXTRACT the files from the zip archive file 1. Carefully review the "Part-1 Output Example" (next section) to see how this program is expected to work 2. Code your solution to Part-1 in the provided "w6p1.c" source code file 3. Begin by prompting the user for their NET monthly income • The monthly income must be at least $500.00, and not more than $400,000.00 • The minimum and maximum values should be stored in unmodifiable variables and used in the validation logic accordingly • Display an appropriate error message if the entered value is outside this range • Validation must be nested in an iteration construct and repeat until a valid value is entered 4. Next, prompt the user to specify the number of wish list items they want to use in the forecast Note • The maximum number of items should be limited to 10 (define a macro to help with this) • Display an appropriate error message if the entered value is outside this range • Validation must be nested in an iteration construct and repeat until a valid value is entered 5. Now you are ready to store the wish list item details. Use an iteration construct to Iterate the number of times necessary to obtain the number of wish list item details specified by the user (from step #4) 6. The item details are made-up of three (3) related pieces of information and must be stored in matching (parallel) arrays: a) Cost - A double floating-point value representing the value of the item -The entered value must be at least $100.00 (use an unmodifiable variable to help with the validation logic accordingly) Display an appropriate error message if the entered value is invalid Validation must be nested in an iteration construct repeating until a valid value is entered b) Priority An integer value representing the priority of the item - The entered value must be between 1 and 3 inclusive where: o 1-a must-have item o 2 important to have item o 3 want to have item Display an appropriate error message if the entered value is out of range Validation must be nested in an iteration construct repeating until a valid value is entered c) Finance Options - A character value representing if an item has financing options (don't need to pay entire value up-front) The entered value can only be a lowercase y orn Display an appropriate error message if the entered value is not a y or n Validation must be nested in an iteration construct repeating until a valid value is entered 7. After storing the data to parallel array's, display a formatted table of the data entered • Use the following printf statements for the table header. printf("Item Priority Financed printf("---- Cost\n"); ----\n"); • Use the following printf formatting to display each wish list item record: printf("%3d %5d x5c %11.21f\n", ... 8. After all the data is displayed, summarize it with the total of all the item costs. Use the following printf statement to properly align it with the appropriate Cost column: printf(" printf(" --\n"); $11.21f\n\n", 9. Finally, before ending the application, display an exit message
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education