Question
Basic Programming principles Peter is the manager of a start-up band called Marvellous Rock. The band is fast gaining popularity amongst the youth of the
Basic Programming principles
Peter is the manager of a start-up band called Marvellous Rock. The band is fast gaining popularity amongst the youth of the country and the request for them to appear in shows are coming in very fast. Peter needs a program where the people who are going to attend a concert can make a ticket booking. Because the band features some lyrics suitable to a more mature audience he needs to be able to ensure the bookings are made for persons over the age of 16 only. The program will thus require the person making the booking to enter the name, birthdate, phone number and e-mail address of each person.
The band is currently performing at three venues, The Little Rock which can house 150 people, the Rock and Drop which can house 300 people and the Sweet Sounds which can host 370 people. The program should ensure that none of the venues are over booked.
The price structure are as follows:
- The Little Rock R150 per person
- Rock and Drop R170 per person
- Sweet Sounds R195 per person
A 5% discount is applied for groups of 7 or more.
The program must ensure that all fields are entered before the booking is submitted and that the fields contains the correct data types.
You are required to:
- Draw a hierarchy chart indicating the function procedures and sub-procedures you will be using to solve this problem (chapter 9).
- Identify one class and a single object of the class that will be created in this program, provide the objects properties for each of the function procedures and sub-procedures
- Provide the planning for the input and output variables.
- Provide an IPO chart based on the input/output/procedures and sub-procedures
- Write the algorithms for each of the function procedures and sub-procedures to solve the problem.
- Here are some general tips:
-
- Accept the date from the system to a variable
- Declare a number of different variables of different types
- Request the user to enter data into the variable
- Test if the data the user enters is the correct data type
- Display an error message if the field is left empty or if the data type is not correct
- Use fictional data and perform a trace table for each of the function procedures and sub-procedures in the algorithms.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started