0% found this document useful (0 votes)
18 views21 pages

Thomas Kabalin - Grade 12 IT PAT

The document outlines the development of an offline store application called U-Grow, aimed at promoting eco-friendly products and supporting environmentally conscious consumers. It includes detailed sections on task definitions, user requirements, database design, and GUI design, along with input, processing, and output specifications. The project emphasizes user-friendly navigation and administrative functionalities for both customers and sellers, with a focus on effective data management and validation processes.

Uploaded by

Creecha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views21 pages

Thomas Kabalin - Grade 12 IT PAT

The document outlines the development of an offline store application called U-Grow, aimed at promoting eco-friendly products and supporting environmentally conscious consumers. It includes detailed sections on task definitions, user requirements, database design, and GUI design, along with input, processing, and output specifications. The project emphasizes user-friendly navigation and administrative functionalities for both customers and sellers, with a focus on effective data management and validation processes.

Uploaded by

Creecha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Thomas Kabalin

IT PAT
Cannons Creek
Grade 12
14 May 2025
Contents
Task Definition (Task 1A).......................................................................................................................2
User Requirements (Task 1B)................................................................................................................3
Database Design (Task 2).......................................................................................................................4
Database Relationships.....................................................................................................................5
Data Dictionary (Task 3A & Task 3B)......................................................................................................5
Classes and Objects...........................................................................................................................5
Text File.............................................................................................................................................6
Array..................................................................................................................................................6
Navigation Flow Diagram (Task 4A).......................................................................................................7
GUI Design (Task 4B)..............................................................................................................................8
Input, Processing, Output (Task 5).......................................................................................................12
Input................................................................................................................................................12
Processing........................................................................................................................................14
Output.............................................................................................................................................15
Addendum A – Learner Declaration....................................................................................................16
Addendum B – Declaration of authenticity.........................................................................................17

Figure 1: ERD Diagram...........................................................................................................................5


Figure 2: Navigation Flow Diagram........................................................................................................7
Figure 3: frmLogin GUI...........................................................................................................................8
Figure 4: frmCreateAccount GUI...........................................................................................................8
Figure 5: frmCustomerHome GUI..........................................................................................................9
Figure 6: frmProductDetails GUI............................................................................................................9
Figure 7: frmCart GUI...........................................................................................................................10
Figure 8: frmSellerHome (Orders) GUI.................................................................................................10
Figure 9: frmSellerHome (Products) GUI.............................................................................................11
Figure 10: frmSellerHome (Reports) GUI.............................................................................................11

2
Task Definition (Task 1A)
TOPIC: Save Our Planet

There are numerous environmental issues that are causing changes in our environment, and it is
mankind's responsibility to take the initiative in saving our planet. Fortunately, people are becoming
increasingly aware of environmental issues and are eager to take action to help address them.
However, it is sometimes difficult to find products that are environmentally friendly and support an
environmentally friendly lifestyle.

The aim of this program, U-Grow, is to support environmentally conscious individuals in making a
positive impact on our world, by developing user-friendly store that offers a wide range of eco-
friendly products for growing healthy produce. Additionally, the store will include features that
enable sellers to easily add their products and reach a wider market.

Customers will be able to sign up and access a wide range of eco-friendly products. These products
will be able to be searched, filtered, and sorted in order to make it easy for customers to navigate.
They will have the ability to add products to their cart and order them when they are ready.
Furthermore, they will be able to see their past receipts and their outstanding balance. Sellers, on
the other hand, will have more powerful administrator accounts that allow them to add, remove,
and update product listings as well as view customer orders. They will be able to record receipts
when a customer pays them.

The project’s scope is be limited to developing of an offline store using Delphi, where all orders,
customers and products are stored in a database. To complete this project by the due date,
extensive planning, backup measures and time management is required.

3
User Requirements (Task 1B)
User Type Role Activity Limitations
Customer – the To create an account Create a new account. Must provide valid
standard users that and then to view and details.
are looking to purchase Login to their account. Must enter the correct
purchase products. environmentally email and password.
friendly products. View, search, filter and None
sort the products.
Add products to their Can only add products
cart. that are in stock.
Order the products. None
Remove / change the Cannot increase the
quantity of products in quantity beyond the
their cart. number in stock.
View their past Can only view their
receipts and receipts, not other
outstanding balance. customers.
Seller – the To provide products Login to their account. Must enter the correct
merchants that list for the customers to username and
their products and purchase and view the password.
perform other customer’s orders so Add new product Must provide valid
administrative that they can fulfil listings. product details.
activities. them. Update existing The updated details
product listings. must be valid.
Remove existing None
product listings.
View customers’ Cannot edit the order
orders. details.
View customers’ Cannot edit the
receipts. receipts once they
have been created.
Record payments Customer must
received by customers. already have an
account
View graphs of their None
sales.

4
Database Design (Task 2)
PK = Primary Key
FK = Foreign Key

tblCustomers

Field Name Field Type Field Size Example


CustomerID (PK) Short Text 6 JDO566
FirstName Short Text 30 John
LastName Short Text 30 Doe
DateOfBirth Date/Time Short Date 20/06/2000
Email Short Text 128 [email protected]
Password Short Text 128 Password123
OutstandingBalance Currency Double R999

tblOrders

Field Name Field Type Field Size Example


OrderID (PK) Short Text 8 INV10000
CustomerID (FK) Short Text 6 JDO566
OrderDate Data/Time Short Date 23/02/2023

tblProducts

Field Name Field Type Field Size Example


ProductID (PK) Short Text 6 GRE568
ProductName Short Text 30 Greenhouse Shelving
UnitPrice Currency Double R999
Description Short Text 250 A large shelf that can
be used in a
greenhouse.
Stock Number Integer 10

tblOrderProd

Field Name Field Type Field Size Example


OrderProdID (PK) Auto Number Long Integer 1
OrderID (FK) Short Text 8 INV10000
ProductID (FK) Short Text 6 GRE568
Quantity Number Integer 1

5
Database Relationships
Each customer will have made either zero, or many orders.
Each order will have one or many products.
Each product will have one or many orders.

Figure 1: ERD Diagram

Data Dictionary (Task 3A & Task 3B)


Classes and Objects
Receipt Class:
The Receipt Class will store the attributes of a receipt as an object. Past receipts from all customers
can be accessed and viewed by the seller. A customer can view all their past receipts.
TReceipt
(Attributes)
- fCustomerID: String;
- fFirstName: String;
- fSurname: String;
- fDateOfPayment: Date;
- fAmountPaid: Real;
- fOutstandingBalance: Real;
(Methods)
+Create(sCustomerID: String; sFirstName: String;
sSurname: String; rAmount: Real; dtDateOfPayment: TDateTime; rOutstandingBalance: Real);
+setBalance;
+toString: String;
+toDelimitedString: String;
+getCustomerID: String;

Description of methods:
 Create – constructor method
o Instantiates the object and set assign values to each of the attributes
 setBalance – mutator method
o Calculates fOutstandingBalance by subtracting fAmountPaid from the customer’s
balance in the database
o Updates the customer’s balance in tblCustomers
 toString – accessor method
o Outputs all of the attributes in a neatly formatted string

6
 toDelimitedString – accessor method
o Outputs all the attributes to a delimited string
 getCustomerID – accessor method
o Outputs the CustomerID attribute

Validation Class:
The Validation Class will have various methods to validate different types of data.

TValidation
(Attributes)
none
(Methods)
+IsValidEmail(sEmail: String): boolean;
+IsNotBlank(sValue: String): boolean;
+IsValidLength(sValue: String; iMaxLength: Integer): boolean;
+IsValidAge(dtDateOfBirth: TDateTime; rMinAge: Real): boolean;
+IsUnique(sValue: String; DataModule: TDataModule; TableName: TADOTable; sField: string):
boolean;

Description of methods:
 IsValidEmail – auxiliary method
o Checks if the email contains a ‘@’ and a ‘.’ in the correct places
 IsNotBlank – auxiliary method
o Checks whether the given string is blank
 IsValidLength – auxiliary method
o Checks that the given string is shorter than the given max length
 IsValidAge – auxiliary method
o Checks that the given date of birth would not make the person younger than the
given minimum age
 IsUnique – auxiliary method
o Checks whether the given string already exists in a given table of a given database

Text File
The first text file will be used to store the data from arrReceipts, an array of objReceipt. Once a
receipt of payment is recorded and it has been stored as a receipt object, the attributes of that
object will be added to the text file. When the array of objects is instantiated, the attributes will be
read from the text file. It will store the following information:
 fCustomerID
 fFirstName
 fSurname
 fDateOfPayment
 fAmountPaid
 fOutstandingBalance

The second text file will store the log-in details for the seller’s account. This account will be set up
when the store is initially setup, so cannot be changed. The text file will contain the username and
password in the following format: username#password

7
8
Array
An array of objects, arrReceipts, will be used to store all the receipts generated by a seller. When
required, the objects in the array will be instantiated from the text file. New objects can be added to
the array when the seller generates a new receipt. The array will be searched by the fCustomerID
attribute in the objects in other to display the past receipts of a particular customer.

9
Navigation Flow Diagram (Task 4A)

Figure 2: Navigation Flow Diagram

10
GUI Design (Task 4B)
frmLogin

Figure 3: frmLogin GUI

frmCreateAccount

Figure 4: frmCreateAccount GUI

11
frmCustomerHome

Figure 5: frmCustomerHome GUI

frmProductDetails

Figure 6: frmProductDetails GUI

12
frmCart

Figure 7: frmCart GUI

frmSellerHome

Figure 8: frmSellerHome (Orders) GUI

13
Figure 9: frmSellerHome (Products) GUI

Figure 10: frmSellerHome (Reports) GUI

14
Input, Processing, Output (Task 5)
Input
frmCreateAccount

Input Format Data Type Source/Component Validation Error Message


Email Address No more than 128 String TEdit (keyboard) Check for blank 'Enter a valid email'
characters in length and Check that it contains a ‘@’ 'Enter a valid email'
contains a ‘@’ and ‘.’ and ‘.’
Check that it is not longer than ‘Email too long’
128 characters
First Name No more than 30 String TEdit (keyboard) Check for blank 'Enter a valid first name
characters in length Check that it is not longer than ‘First name too long’
30 characters
Check that it is a string ‘Enter a valid first name’
consisting of valid characters
only (i.e. does not contain any
numbers)
Last Name No more than 30 String TEdit (keyboard) Check for blank 'Enter a valid last name'
characters in length Check that it is not longer than ‘Last name too long’
30 characters
Check that it is a string ‘Enter a valid first name’
consisting of valid characters
only (i.e. does not contain any
numbers)
Date of Birth Date in the format ‘dd- TDateTime TDatePicker (mouse) Check that the age is at least ‘Age must be at least 13
mm-yyyy’ 13 years old years old’
Ensure that the value entered ‘Enter a valid date’
is a date by means of a data
picker component.
Password String that is no more String TEdit (keyboard) Check for blank 'Enter a valid password

15
than 128 characters in Check that it is not longer than ‘Password too long’
length 128 characters
Email addresses A list of emails that are String Database Module N/A N/A
already registered each no more than 128 (database)
characters in length and
contain a ‘@’ and ‘.’

frmSellerHome (Orders Tab)

Input Format Data Type Source/Component Validation Error Message


Customer Name First Name + Last Name String TListBox (mouse) Check that a customer has ‘Please select a customer’
been selected
Receipt amount Currency – ‘R0.00’ Real InputQuery (keyboard) Check that the amount is ‘Receipt amount must be
greater than 0 greater than 0’
Check that it is a number ‘Please enter a valid
amount’

frmProductDetails

Input Format Data Type Source/Component Validation Error Message


Quantity Number that is greater Integer TSpinEdit Check that the quantity ‘Quantity must be greater
than 0 (mouse/keyboard) selected is greater than 0 than 0’
Check that it is not greater ‘Not enough in stock’
than the quantity in stock
Ensure that the value entered ‘Enter a valid number’
is a number by means of a spin
edit.
Stock of the product Number that is greater Integer Database Module N/A
than 0 (database)

16
Processing
Processes to be done:

1. Perform a query to display the total cost of each order belonging to a specific customer.
2. Perform a query to display daily sales figures for a specific range of products so that a chart
can be created from it.
3. Sort the products for the customer.
4. Filter the products for the customer.
5. Add the selected product to the cart.
6. Place an order by adding the order details to the database.
7. Search through the products.
8. Record a payment as an object and generate a receipt for it.
9. Add a new customer to the database when a new user creates an account.
10. Update the details of a product in the database.
11. Delete a product from the database.
12. Add a new product to the database.

How processing will be done:

No. Process Description Algorithm


1 Perform a Create a query that will 1. Select the OrderID, OrderDate, and the
query to show the date and TotalAmount (sum of UnitPrice times
display the order number for each Quantity) from the three tables:
total cost of order made by a specific tblProducts, tblOrders, and tblOrderProd.
each order customer, along with 2. Filter the results by joining the three tables
belonging to a the total cost of all the on their primary and foreign keys.
specific products in each order. 3. Then filter the CustomerID field in tblOrders
customer. It calculates the cost by to return only the orders that belong to the
adding up the cost of specified customer.
each product in the 4. Group the results by OrderID and
order. OrderDate to get the total amount for each
order.
2 Perform a Create a query that will, 1. Select the OrderDate and the TotalAmount
query to for each day, show the (sum of the unit price times the Quantity)
display daily total income from a set from the three tables:
sales figures of products. Dates will tblProducts, tblOrders, and tblOrderProd.
for a specific be limited to a specified 2. Filter the results by joining the three tables
range of period. These results on their primary and foreign keys.
products so will then be added to a 3. Then filter the ProductID field in
that a chart bar graph comparing tblProducts to return only the product(s)
can be created the order date to the specified by the user.
from it. total income from the 4. Finally, filter the OrderDate field in
specified products. tblOrders to only show order between the
start date and the end date specified by the
user.
5. Group the results by the OrderDate to show
the totals for each day.
6. Loop through the query and for each date,
as the TotalAmount to the TChart.
3 Sort the Sort the products by the 1. Extract the field name, and whether it

17
products for selected field in should be sorted ascending or descending,
the customer. ascending or from the combo box.
descending order based 2. Sort tblProducts by the selected field (ASC
on the user's selection. or DESC depending on selection).
This is performed by 3. Set the length of the dynamic array of
sorting tblProducts and ProductIDs to the number of records in the
then adding the table.
ProductIDs in the 4. Loop through the table and add the
correct order to an ProductIDs to the array.
array. The products’ 5. Use the ProductIDs to locate the
information will then be ProductName and ProductPrice of each
displayed for the user. product.
6. Display the information on the relevant
components.
4 Place an order Firstly, the order details 1. Insert a new record in tblOrders.
by adding the must be added to 2. Generate a new OrderID, set the OrderDate
order details tblOrders. Then, the to the current date and the CustomerID to
to the products purchased and the current customer’s ID.
database. their quantities must be 3. Start a loop through the records in the cart
added to tblOrderProd. table.
Finally, tblProducts 4. For each record, add the ProductID of the
need to be updated to record, the quantity of products and the
reflect the decrease in previously generated OrderID to a new
stock of the products record in tblOrderProd.
before the cart is 5. For each record, decrease the stock of the
cleared. product in tblProducts by the quantity
purchased.
6. Clear the temporary cart table.
7. Display a message that the order was
successful and return the user to the home
page.

18
Output
frmCart

Data to Output Format of Output Output Component


Query based on tblCart (a ProductName - string that is DBGrid
temporary table containing no longer than 30 characters
the products in the cart) Quantity – integer
ItemTotal – currency ‘R0,00’
Selected product’s name String that is no longer than 30 TLabel
characters
Selected product’s quantity Integer TSpinEdit
Image of selected product Image TImage
Total order value Real (Currency) - ‘R0,00’ TEdit

frmSellerHome (Reports Tab)

Data to Output Format of Output Output Component


List of product names List of strings that are no TListBox
longer than 30 characters each
Chart of sales for selected Bar chart with each bar TChart
products during a selected representing income
period (currency) for a particular day
(date)
Image of the chart Bitmap (.bmp) image of the N/A
chart (as described above)

Receipt Dialog Box

Data to Output Format of Output Output Component


Receipts belonging to the Three columns with the TRichEdit
customer following headings: Receipt
Date, Receipt Amount,
Outstanding Balance
Outstanding balance Real (Currency) – ‘R0,00’ TEditBox

19
Addendum A – Learner Declaration
I understand that the work submitted for assessment must be my own.
Have you received help/information from anyone to produce this work?

No Yes (provide details below)


Help/information Nature of the help/information (provide evidence):
received from (person):

_________________________ 26/03/2023
Signature of Learner Date

20
Addendum B – Declaration of
authenticity
Learner name Thomas Kabalin ID Number 0507205452083

Grade 12 Year 2023

Subject Information Technology

Practical Assessment Task (PAT) Teacher Mrs Rachael Pillay

I hereby declare that the contents of this assessment task are my own original work
(except where there is clear acknowledgement and appropriate reference to the work
of others) and have not been plagiarised, copied from someone else or previously
submitted for assessment by anyone.

_________________________ 26/03/2023
Signature of Learner Date

21

You might also like