1. Review the customer requirements 2. Review the IPO and example pseudocode found below. 3. Open Flowgorithm and save with the required naming conventions in the “Lab Task Checklist” and remember to enter your Program Attributes. 4. Translate the below pseudocode to flowcharts using Flowgorithm. 5. What the pseudocode does: 6. Reserve Memory Locations (Declare) - Use as short and meaningful names a. Variables - Declares variables close to where they will be used i. Use the correct naming conventions (found in ROE) b. Named constants - Declares named constants at the start of the program i. Uses named constants for: 1. cost of adult tickets 2. cost of child tickets 3. TAX rate 4. the two different fees 5. ATTEND number test c. Uses prompts to describe required input before asking for input d. You will need to provide the title of your own concert, as well as your lastname for programmer credits and end of program message e. The output is delineated what each value is. i. name and phone number with the details of total cost f. Detailed breakout of Total cost to include: # of adult tickets, # of child tickets, subtotal, sales Tax total, fee, and total cost. 7. Document your test cases using the comment block of flowgorithm SPECIAL NOTE: Do not use magic numbers when named constants are a better choice. i.e., #cost of tickets, TAX rate, fee charges, test for fee. Make sure your calculation uses the NAMED CONSTANTS instead of actual numbers. INPUT, PROCESSING AND OUTPUT (IPO) Input Processing Output Constants: Tax Rate = 0.07 Price of adult tickets = 36.75 Price of child tickets = 25.50 Maximum fee = 1.00 Minimum fee = .50 Attend Limit = 5 Variables: Name Phone Number # adult tickets # child tickets Date Assign price of adult, child tickets and Tax rate Assign fee rate for minimum and maximum Assign number for Attend test Get # adult tickets Test for Adults Get Date Test for Date Get # child tickets Get Name, Phone Number Calculate subtotal, sales Tax, fee, and total cost • subtotal = (#adult * 36.75) + (#child * 25.50) • total sales TAX = subtotal * 0.07 • total fees if less than or equal to 5 attending o fee = #total tickets * 1.00 • total fees if more than 5 attending o fee=#total tickets * .50 • total cost = subtotal + sales TAX + fee EXIT • If does not pass adult test, exit with msg • If does not pass date test; exit with msg Title of Concert error message for adult and date Prompts for Input # adult tickets, # child tickets and result of subtotal, sales Tax, total cost. name and phone number with an additional sentence saying the details of total cost Programmer Credits Test Data T1:Adults 0, child 2 Exits at adult entry T2: Adults 2, child 0. Wrong Date. exits at date entry T3: adults 2 , child 2. Subtotal = 124.5.5. Sales Tax =8.715 , fee = 4,total cost = 137.215 Test 5 or less T4: adults 3, child 2. Subtotal = 161.25, Sales Tax= 11.2875, fee = 5 for Total Cost = 177.5375. attending=5 T5: adults 3 child 3 Subtotal = 186.75, Sales Tax=13.0725, fee = 3 for Total Cost = 202.8225 PSEUDOCODE EXAMPLE (GADDIS PSEUDOCODE): **DISCLAIMER: This is only one of many ways that can be used to meet the customer requirements above. ** Reminder: Flowgorithm concatenation symbol is an ampersand (&) not a comma (,) Function Main // T1:Adults 0, child 2 Exits at adult entry // T2: Adults 2, child 0. Wrong Date. exits at date entry // T3: adults 2 , child 2. Subtotal = 124.5.5. Sales Tax =8.715 , fee = 4,total cost = 137.215 Test 5 or less // T4: adults 3, child 2. Subtotal = 161.25, Sales Tax= 11.2875, fee = 5 for Total Cost = 177.5375. // T5: adults 3 child 3 Subtotal = 186.75, Sales Tax=13.0725, fee = 3 for Total Cost = 202.8225 Declare Real TAX, ADULTcost, CHILDcost, MINfee, MAXfee Set TAX = 0.07 Set ADULTcost = 36.75 Set CHILDcost = 25.50 Set MINfee = 0.50 Set MAXfee = 1.00 Declare Integer ATTEND Set ATTEND = 5 Display "This program calculates total cost of concert tickets" Display "Some CONCERT Title" Display "How Many Adults. You need at least one." Declare Integer adultTickets Input adultTickets If adultTickets >= 1 Then Display "You must choose one of the allowed dates which are Mar, Apr or May" Display "Please enter the date you wish to Attend" Declare String date Input date If date == "Mar" OR date == "Apr" OR date == "May" Then Display "Child Tickets Needed" Declare Integer childTickets Input childTickets Display "Name" Declare String name Input name Display "Phone Number"
1. Review the customer requirements 2. Review the IPO and example pseudocode found below. 3. Open Flowgorithm and save with the required naming conventions in the “Lab Task Checklist” and remember to enter your Program Attributes. 4. Translate the below pseudocode to flowcharts using Flowgorithm. 5. What the pseudocode does: 6. Reserve Memory Locations (Declare) - Use as short and meaningful names a. Variables - Declares variables close to where they will be used i. Use the correct naming conventions (found in ROE) b. Named constants - Declares named constants at the start of the program i. Uses named constants for: 1. cost of adult tickets 2. cost of child tickets 3. TAX rate 4. the two different fees 5. ATTEND number test c. Uses prompts to describe required input before asking for input d. You will need to provide the title of your own concert, as well as your lastname for programmer credits and end of program message e. The output is delineated what each value is. i. name and phone number with the details of total cost f. Detailed breakout of Total cost to include: # of adult tickets, # of child tickets, subtotal, sales Tax total, fee, and total cost. 7. Document your test cases using the comment block of flowgorithm SPECIAL NOTE: Do not use magic numbers when named constants are a better choice. i.e., #cost of tickets, TAX rate, fee charges, test for fee. Make sure your calculation uses the NAMED CONSTANTS instead of actual numbers. INPUT, PROCESSING AND OUTPUT (IPO) Input Processing Output Constants: Tax Rate = 0.07 Price of adult tickets = 36.75 Price of child tickets = 25.50 Maximum fee = 1.00 Minimum fee = .50 Attend Limit = 5 Variables: Name Phone Number # adult tickets # child tickets Date Assign price of adult, child tickets and Tax rate Assign fee rate for minimum and maximum Assign number for Attend test Get # adult tickets Test for Adults Get Date Test for Date Get # child tickets Get Name, Phone Number Calculate subtotal, sales Tax, fee, and total cost • subtotal = (#adult * 36.75) + (#child * 25.50) • total sales TAX = subtotal * 0.07 • total fees if less than or equal to 5 attending o fee = #total tickets * 1.00 • total fees if more than 5 attending o fee=#total tickets * .50 • total cost = subtotal + sales TAX + fee EXIT • If does not pass adult test, exit with msg • If does not pass date test; exit with msg Title of Concert error message for adult and date Prompts for Input # adult tickets, # child tickets and result of subtotal, sales Tax, total cost. name and phone number with an additional sentence saying the details of total cost Programmer Credits Test Data T1:Adults 0, child 2 Exits at adult entry T2: Adults 2, child 0. Wrong Date. exits at date entry T3: adults 2 , child 2. Subtotal = 124.5.5. Sales Tax =8.715 , fee = 4,total cost = 137.215 Test 5 or less T4: adults 3, child 2. Subtotal = 161.25, Sales Tax= 11.2875, fee = 5 for Total Cost = 177.5375. attending=5 T5: adults 3 child 3 Subtotal = 186.75, Sales Tax=13.0725, fee = 3 for Total Cost = 202.8225 PSEUDOCODE EXAMPLE (GADDIS PSEUDOCODE): **DISCLAIMER: This is only one of many ways that can be used to meet the customer requirements above. ** Reminder: Flowgorithm concatenation symbol is an ampersand (&) not a comma (,) Function Main // T1:Adults 0, child 2 Exits at adult entry // T2: Adults 2, child 0. Wrong Date. exits at date entry // T3: adults 2 , child 2. Subtotal = 124.5.5. Sales Tax =8.715 , fee = 4,total cost = 137.215 Test 5 or less // T4: adults 3, child 2. Subtotal = 161.25, Sales Tax= 11.2875, fee = 5 for Total Cost = 177.5375. // T5: adults 3 child 3 Subtotal = 186.75, Sales Tax=13.0725, fee = 3 for Total Cost = 202.8225 Declare Real TAX, ADULTcost, CHILDcost, MINfee, MAXfee Set TAX = 0.07 Set ADULTcost = 36.75 Set CHILDcost = 25.50 Set MINfee = 0.50 Set MAXfee = 1.00 Declare Integer ATTEND Set ATTEND = 5 Display "This program calculates total cost of concert tickets" Display "Some CONCERT Title" Display "How Many Adults. You need at least one." Declare Integer adultTickets Input adultTickets If adultTickets >= 1 Then Display "You must choose one of the allowed dates which are Mar, Apr or May" Display "Please enter the date you wish to Attend" Declare String date Input date If date == "Mar" OR date == "Apr" OR date == "May" Then Display "Child Tickets Needed" Declare Integer childTickets Input childTickets Display "Name" Declare String name Input name Display "Phone Number"
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
Related questions
Question
1. Review the customer requirements
2. Review the IPO and example pseudocode found below.
3. Open Flowgorithm and save with the required naming conventions in the “Lab Task Checklist” and remember to enter your Program Attributes.
4. Translate the below pseudocode to flowcharts using Flowgorithm.
5. What the pseudocode does:
6. Reserve Memory Locations (Declare) - Use as short and meaningful names
a. Variables - Declares variables close to where they will be used
i. Use the correct naming conventions (found in ROE)
b. Named constants - Declares named constants at the start of the program
i. Uses named constants for:
1. cost of adult tickets
2. cost of child tickets
3. TAX rate
4. the two different fees
5. ATTEND number test
c. Uses prompts to describe required input before asking for input
d. You will need to provide the title of your own concert, as well as your lastname for programmer credits and end of program message
e. The output is delineated what each value is.
i. name and phone number with the details of total cost
f. Detailed breakout of Total cost to include: # of adult tickets, # of child tickets, subtotal, sales Tax total, fee, and total cost.
7. Document your test cases using the comment block of flowgorithm
SPECIAL NOTE:
Do not use magic numbers when named constants are a better choice. i.e., #cost of tickets, TAX rate, fee charges, test for fee. Make sure your calculation uses the NAMED CONSTANTS instead of actual numbers.
INPUT, PROCESSING AND OUTPUT (IPO)
Input Processing Output
Constants:
Tax Rate = 0.07
Price of adult tickets = 36.75
Price of child tickets = 25.50
Maximum fee = 1.00
Minimum fee = .50
Attend Limit = 5
Variables:
Name
Phone Number
# adult tickets
# child tickets
Date
Assign price of adult, child tickets and Tax rate
Assign fee rate for minimum and maximum
Assign number for Attend test
Get # adult tickets
Test for Adults
Get Date
Test for Date
Get # child tickets
Get Name, Phone Number
Calculate subtotal, sales Tax, fee, and total cost
• subtotal = (#adult * 36.75) + (#child * 25.50)
• total sales TAX = subtotal * 0.07
• total fees if less than or equal to 5 attending
o fee = #total tickets * 1.00
• total fees if more than 5 attending
o fee=#total tickets * .50
• total cost = subtotal + sales TAX + fee
EXIT
• If does not pass adult test, exit with msg
• If does not pass date test; exit with msg Title of Concert
error message for adult and date
Prompts for Input
# adult tickets, # child tickets and result of subtotal, sales Tax, total cost.
name and phone number with an additional sentence saying the details of total cost
Programmer Credits
Test Data
T1:Adults 0, child 2 Exits at adult entry
T2: Adults 2, child 0. Wrong Date. exits at date entry
T3: adults 2 , child 2. Subtotal = 124.5.5. Sales Tax =8.715 , fee = 4,total cost = 137.215 Test 5 or less
T4: adults 3, child 2. Subtotal = 161.25, Sales Tax= 11.2875, fee = 5 for Total Cost = 177.5375. attending=5
T5: adults 3 child 3 Subtotal = 186.75, Sales Tax=13.0725, fee = 3 for Total Cost = 202.8225
PSEUDOCODE EXAMPLE (GADDIS PSEUDOCODE):
**DISCLAIMER: This is only one of many ways that can be used to meet the customer requirements above.
** Reminder: Flowgorithm concatenation symbol is an ampersand (&) not a comma (,)
Function Main
// T1:Adults 0, child 2 Exits at adult entry
// T2: Adults 2, child 0. Wrong Date. exits at date entry
// T3: adults 2 , child 2. Subtotal = 124.5.5. Sales Tax =8.715 , fee = 4,total cost = 137.215 Test 5 or less
// T4: adults 3, child 2. Subtotal = 161.25, Sales Tax= 11.2875, fee = 5 for Total Cost = 177.5375.
// T5: adults 3 child 3 Subtotal = 186.75, Sales Tax=13.0725, fee = 3 for Total Cost = 202.8225
Declare Real TAX, ADULTcost, CHILDcost, MINfee, MAXfee
Set TAX = 0.07
Set ADULTcost = 36.75
Set CHILDcost = 25.50
Set MINfee = 0.50
Set MAXfee = 1.00
Declare Integer ATTEND
Set ATTEND = 5
Display "This program calculates total cost of concert tickets"
Display "Some CONCERT Title"
Display "How Many Adults. You need at least one."
Declare Integer adultTickets
Input adultTickets
If adultTickets >= 1 Then
Display "You must choose one of the allowed dates which are Mar, Apr or May"
Display "Please enter the date you wish to Attend"
Declare String date
Input date
If date == "Mar" OR date == "Apr" OR date == "May" Then
Display "Child Tickets Needed"
Declare Integer childTickets
Input childTickets
Display "Name"
Declare String name
Input name
Display "Phone Number"
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 8 steps with 12 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education