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 uniform electric field of magnitude 250 V/m is directed in the positive x direction. A) 12.0-+C charge moves from the origin to the point (x, y) = (20.0 cm, 50.0 cm). (a) What is the change in the...
-
Verify that the derivatives of sinh z and cosh z are as stated in equations (2), Sec. 35. Equation (2) Because of the way in which the exponential function appears in definitions (1) and in the...
-
A \(205 \mathrm{~mm} \times 245 \mathrm{~mm}\) sheet of wetted fabric is hung up to dry on a warm, sunny day. The still air is at a temperature of \(30^{\circ} \mathrm{C}\) and relative humidity of...
-
Jorge, Marta, and Jocelyn are college graduates, and Jorge has come up with an idea for a new product that he believes could make the three of them very rich. His idea is to manufacture soft-drink...
-
The stockholders' equity section of Larkspur Inc. at the beginning of the current year appears below. Common stock, $10 par value, authorized 954,000 shares, 307,000 shares issued and outstanding...
-
Reba Dixon is a fifth-grade school teacher who earned a salary of $38,000 in 2019. She is 45 years old and has been divorced for four years. She receives $1,200 of alimony payments each month from...
-
A firm began Sept 2020 with 5,000 units in WIP. 45,000 unitswere started during September, andended September with 3,000 units. Beginning units were 80% completewith respect tomaterials and 50% co 1...
-
A pharmaceutical firm receives approval for marketing a drug in country A and country B. The demand function for this drug in countries A and B are p=84-2x and p=124-3x respectively, where p is the...
-
In 1957, Procter & Gamble acquired Green Bay, Wisconsin-based tissue maker Charmin, its first consumer-paper products business. One product in particular, Charmin Towels, was a single-ply towel that...
-
Multiply. (Simplify your answer completely.) (2y4)(4y+9)
-
Discuss Comparative Analysis of Gross Margin? Explain briefly How ABC Method vs Traditional Method Geoffrey Doll Specialty- Branded Doll #106 Cradles ABC Traditional Method 9% 34% 21% Difference...
-
Mojo Bones is planning a big March Madness party that is expected to sell out of presold tickets, so security personnel are working with the bar manager to reduce the risk of crime and bar-related...
-
Say whether the following characteristics refer to Formative Assessment or Summative Assessment. (10) Informal, continuous, daily. Formal, School-Based Assessment (SBA) and end-of year examinations....
-
What are multinational corporations (MNCs) and what economic roles do they play?
-
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 orientation of an electric dipole in a uniform electric field has the greatest electric potential energy? What orientation has the least? (Let the system comprise both the electric dipole and...
-
You release three balls simultaneously from the same height above the floor. The balls all carry the same quantity of surplus positive charge, but they have different masses: \(1 \mathrm{~kg}, 2...
-
A dipole carrying charges \(+q\) and \(-q\) separated by a distance \(d\) is rotated \(180^{\circ}\) in a uniform electric field (Figure P25.7). What is the change in electric potential energy...
Study smarter with the SolutionInn App