Information Technology Cycle Test
Scenario: A coffee shop has approached you to assist with the analysis of their
client data. They have provided you with a database ([Link]) that has been
linked to the incomplete program frmCoffee_u.pas and frmCoffee_p.dpr making
use of a data module named dmCoffee saved as dmCoffee_u.pas.
NOTE: You may detach this page from your question paper to make reference to the
tables easier.
Database Design View of Fields:
1 Please turn over
Information Technology Cycle Test
An extract of the Table Values:
Relationship between tables:
Open the program frmCoffee_p.dpr and complete the program as described below.
2 Please turn over
Information Technology Cycle Test
1. In the menu Q1 display the history of the clients sorted according to the date they
visited the coffee shop from the most recent to the oldest date. (3)
An extract of the output:
.
.
.
2. In the menu Q2 calculate and display the amount owing for each visit of those
clients that visited the coffee shop for more than an hour and 10 minutes in June.
(7)
Example of output:
3 Please turn over
Information Technology Cycle Test
3. In menu Q3 calculate the number of clients that visited per day of clients with a
client number of 1, 16 and 25. Display only those days that had more than one of
these clients visit on the day. (6)
Example of output:
4. In menu Q4 display the client number, name, surname and age of those clients
that visited the shop for 10 minutes or less. (5)
Example of output:
5. Hotmail has gone under. In menu Q5 replace all e-mail addresses that end with
[Link] with the words “Need new”. Calculate and display how many
records have been changed. When you click on this menu the first time it should
show that 5 records have been changed. (7)
6. The coffee shop has realised that the data for Monday’s are incorrect since they
are closed on Monday’s. In menu Q6 delete all the records from the client visits
where they visited on a Monday. Select menu Q1 to see if all the Monday
records were deleted. (3)
4 Please turn over
Information Technology Cycle Test
7. In Form OnActivate do the following:
Display all the fields in the Clients table.
Loop through the table to add each client’s ID to the ComboBox cmbClient
provided. (7)
NOTE: If you are not able to populate the ComboBox you will lose these marks
as well as some of the marks for the next question. You will then need to use
hard code for the values of the client ID in the next question.
8. In the menu Q7 get input from the ComboBox and RadioGroup from the user for
the client number and day visisted. Make use of a dialog box to get input from
the user for the amount of minutes the client spent in the coffee shop. Use
today’s date and all input from the user to insert a new record into the
ClientHistory table. The rate per hour will be left out for all new entries. After
you have inserted this record you should be able to see the new record if you
select the menu Q1. (12)
When you are done you may print without asking.
Enter your Name and Surname as a comment in the first line of the
unit frmClient_u
Save all the files ('File/Save All').
Right click on the unit (frmClient_u.pas) and left click on Edit with
Notepad++.
Select File>Print
5 Last page