Purpose to practice Writing and evaluating loop logic Selecting the correct loops types Using...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Purpose – to practice Writing and evaluating loop logic • Selecting the correct loops types Using loops Problem Statement Code a program to print (output) a ticket for each person in a group. Remember to back-up your program before you begin the next phase. Phase 1 • Ask the user to choose an event from the menu. You can make up your own events. • Ex. o A. DC Auto Show - $49 。 B. NSO at the Kennedy Center - $90 o C. Capitol's Hockey Game - $150 • Ask the user for the number of tickets they want • Ask the user to enter their name • You can make up a price for the event (based on the event they chose) • Print (output) as many tickets as the user requested Output the total amount of all tickets for that customer • THEN : Ask the user, "Do you want to make another purchase?" (use a yes/no dialog box for this). • Use the BEST loop types for this scenario. ents • HINT: This lab requires 2 loops. Phase 2 - (Optional) • Add an error loop to make sure that the user entered A, B or C Phase 3 - Challenge - Not Required • Remove processing from the main() and execute it in a function. • Write the function in the SAME file as the main() Sample Run Welcome to Tickets 120 C A. DC Auto Show B. NSO at the Kennedy Center C. Capital's Hockey Game What event are you attending? How many tickets do you want? 5 Enter your name Enter your name Marge Simpson Capital's Hockey Game - 1 admission $99.00 Capital's Hockey Game - 1 admission $99.00 Capital's Hockey Game - 1 admission $99.00 Capital's Hockey Game - 1 admission $99.00 Capital's Hockey Game - 1 admission $99.00 Your Total is: $495.00 Do you want to make another purchase? y/n Y A. DC Auto Show B. NSO at the Kennedy Center C. Capital's Hockey Game What event are you attending? a How many tickets do you want? 2 Enter your name Marge Simpson DC Auto Show - 1 admission $29.99 DC Auto Show - 1 admission $29.99 Your Total is: $59.98 Do you want to make another purchase? y/n N Thank you for using Tickets 120. Enjoy your event. Required Material to be Submitted to Blackboard • A copy of your program source code saved to a .TXT file • A screen capture of your program being executed, with the result showing Your source code must include the following comment code at the beginning of your program: Lab # Name: your name Purpose – to practice Writing and evaluating loop logic • Selecting the correct loops types Using loops Problem Statement Code a program to print (output) a ticket for each person in a group. Remember to back-up your program before you begin the next phase. Phase 1 • Ask the user to choose an event from the menu. You can make up your own events. • Ex. o A. DC Auto Show - $49 。 B. NSO at the Kennedy Center - $90 o C. Capitol's Hockey Game - $150 • Ask the user for the number of tickets they want • Ask the user to enter their name • You can make up a price for the event (based on the event they chose) • Print (output) as many tickets as the user requested Output the total amount of all tickets for that customer • THEN : Ask the user, "Do you want to make another purchase?" (use a yes/no dialog box for this). • Use the BEST loop types for this scenario. ents • HINT: This lab requires 2 loops. Phase 2 - (Optional) • Add an error loop to make sure that the user entered A, B or C Phase 3 - Challenge - Not Required • Remove processing from the main() and execute it in a function. • Write the function in the SAME file as the main() Sample Run Welcome to Tickets 120 C A. DC Auto Show B. NSO at the Kennedy Center C. Capital's Hockey Game What event are you attending? How many tickets do you want? 5 Enter your name Enter your name Marge Simpson Capital's Hockey Game - 1 admission $99.00 Capital's Hockey Game - 1 admission $99.00 Capital's Hockey Game - 1 admission $99.00 Capital's Hockey Game - 1 admission $99.00 Capital's Hockey Game - 1 admission $99.00 Your Total is: $495.00 Do you want to make another purchase? y/n Y A. DC Auto Show B. NSO at the Kennedy Center C. Capital's Hockey Game What event are you attending? a How many tickets do you want? 2 Enter your name Marge Simpson DC Auto Show - 1 admission $29.99 DC Auto Show - 1 admission $29.99 Your Total is: $59.98 Do you want to make another purchase? y/n N Thank you for using Tickets 120. Enjoy your event. Required Material to be Submitted to Blackboard • A copy of your program source code saved to a .TXT file • A screen capture of your program being executed, with the result showing Your source code must include the following comment code at the beginning of your program: Lab # Name: your name
Expert Answer:
Answer rating: 100% (QA)
The problem statement describes a programming exercise where you are tasked with creating a program that simulates a ticket purchase system for various events Here are the main components of the probl... View the full answer
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date:
Students also viewed these programming questions
-
How to be good in understanding financial statment analysishow can we start to be better?Operating profit is sometimes referred to as EBIT (earnings before interest and taxes). However, operating...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
How did your parents communication with you influence your self-concept?
-
A train traveling at a constant speed rounds a curve of radius 235m. A lamp suspended from the ceiling swings out to an angle of 17.5o throughout the curve. What is the speed of the train?
-
1/2 +2 and 16 units cost $79. Find the cost function if the marginal cost function is given by C'(x)=x" C(x) =
-
How is the concept of encapsulation applied to database management?
-
Teller Co. sold 20,000 units of its only product and incurred a $70,000 loss (ignoring taxes) for the current year as shown here. During a planning session for year 2010s activities, the production...
-
The Lang Corporation has provided the following account balances: Account Amount Cash $25,000 Short-term Investments 5,000 Accounts Receivable 20,000 Supplies 7,000 Long-term Notes Receivable 3,000...
-
Activity-based budgeting, Balanced Scorecard, and strategy Sippican Corporation (B)12 Refer to Case 5-36, the Sippican Corporation (A) case, which required time-driven ABC analysis. Sippican's senior...
-
Assume that the probability of breast cancer equals .01 for women in the 50-59 age group. Furthermore, if a women does have breast cancer, the probability of a true positive mammogram (correct...
-
Each part of Figure Q20.12 shows two points near two charges. Compare the electric field strengths \(E_{1}\) and \(E_{2}\) at these two points. Is \(E_{1}>E_{2}, E_{1}=E_{2}\), or \(E_{1}
-
Terrain analysis. Suppose that a terrain is represented by a two-dimensional grid of elevation values (in meters). A peak is a grid point whose four neighboring cells (left, right, up, and down) have...
-
Henredon purchases a high-precision programmable router for shaping furniture components for \($190,000.\) It is expected to last 12 years and have a salvage value of \($5,000.\) It will produce...
-
A currently owned shredder used in a refuse-powered electrical generating plant has a present net realizable value of \($210,000\) and is expected to have a market value of \($10,000\) after 4 years....
-
Among all monthly bills from a certain credit card company, the mean amount billed was \(\$ 485\) and the standard deviation was \(\$ 300\). In addition, for \(15 \%\) of the bills, the amount billed...
-
Question 2. Let a be a constant and suppose that f(x) 0 a) Find a. b) Find the cdf of X. c) Find P(16 x 81). d) Find E[X]. e) Find V[X]. f) Let Y = 1/X. Find the cdf of Y. 1 is a pdf of some...
-
On January 1, 2017, McIlroy, Inc., acquired a 60 percent interest in the common stock of Stinson, Inc., for $340,200. Stinson's book value on that date consisted of common stock of $100,000 and...
-
The following are part numbers: 238902, 238933, 239402, 235693, 235405, 239204, 240965. Develop a check digit for them using 1-3-1-3-1 multipliers and modulus 11. Use the method presented in this...
-
Explain what command-language interfaces are. To what types of users are they best suited?
-
1. Assume your team members have used the Training Unit Client Characteristics Report to design a database table to store the relevant information contained on this report, with the following result:...
-
Obtain the time variation of the lift and propulsive force coefficients and their plots for the airfoil given by Example 8.5. Assume that the profile pitches about quarter chord point. Example 8.5...
-
Write down a numerical solution algorithm for the LU decomposition solution of the pseudo penta diagonal matrix equation given by (A11.4). A11.4 || B C 2 A2 B2 C2 922 An-1 Bn-1 Cn-1 -1 An Bn R R Rn-1...
-
Obtain Eq. 8.66 as a relation between the wake vorticity and the reduced circulation. Eq. 8.66 w(x) = k(Q; cosx-22, sin x) cos ks +k(Q; sin x+Q, cos x) sinks, Q = Q, +Q;i
Study smarter with the SolutionInn App