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?
-
What is a value-added tax, and how does it differ from an income tax?
-
Find the mean and standard deviation for the binomial random variable x with n _ 30 and p _ 0.6 using formulas (5.7) and (5.8).
-
Income statement information for Sim Corporation in 20x6 is as follows: a. Administrative expenses, $220,000 b. Cost of goods sold, $880,000 c. Extraordinary loss from a storm (net of taxes,...
-
Bill Thomas, Bates & Hills controller, has received all the budgets prepared by the various operating units (see Exercises 5-8, 9, 11, 15, 17, 19, 20, 23, 25, and 29) and is ready to compile the...
-
Q2. Solve the following problems: (a) Define functions f(x) = , g(x) = cos(r) and h(x) = arccos(r ) where the domain of h is defined to be [-1, 1). Find (i) the expressions of f(x)g(x) + h(x) and...
-
Euro Corporation, a U.S. corporation, operates through a branch in Germany. During 2022, the branch reported taxable income of $1,000,000 and paid German income taxes of $300,000. In addition, Euro...
-
GTO Incorporated is considering an investment costing $210,720 that results in net cash flows of $30,000 annually for 10 years. (PV of $1, FV of $1, PVA of $1, and EVA of $1) (Use appropriate...
-
describe strengths and opportunities about "strategies for competing in international markets" and "ethics, corporate social responsibility, environmental sustainability and strategy" in terms of...
-
XYZ, Inc. reported $20 million in operating current assets, $25 million in net fixed assets, and $6 million in operating current liabilities. What are the inventories and fixed assets for XYZ, Inc.,...
-
Five Star Corporation will pay a dividend of $ 2 . 9 0 per share next year. The company pledges to increase its dividend by 4 percent per year indefinitely. If you require a return of 1 1 percent on...
-
You just graduated from college and will start your first full-time job on Monday. You are a software engineer for a major designer of smartphone apps for the financial services You were able to get...
-
Tic tac toe has subgame perfect equilibria in which the first player puts her first X in a corner. The second player's move is the same in all these equilibria. What is it? Subgame perfect equilibria...
-
Find the a. mean and b. standard deviation for the data set. Round to two decimal places. International Travel Destinations of U.S. Citizens in 2000 Country U.S. Citizens, in thousands ABCDEFGHAJ 982...
-
The Pletcher Transportation Company uses a responsibility reporting system to measure the performance of its three investment centers: Planes, Taxis, and Limos. Segment performance is measured using...
-
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:...
-
What are the benefits of separating the roles of chairman and chief executive? R2
-
Special order decision given revised data (Learning Objective 2) Consider the ACDelco special sales order example on pages 419-421. Suppose ACDelcos variable manufacturing cost is $1.35 per oil...
-
Determine relevance of information (Learning Objective 1) You are trying to decide whether to trade in your ink-jet printer for a more recent model. Your usage pattern will remain unchanged, but the...
Study smarter with the SolutionInn App