[go: up one dir, main page]

0% found this document useful (0 votes)
25 views4 pages

WIX1002 Assignment Topic 1

The document outlines a project for creating a Price Comparison program for Thrifty Timmy, which involves utilizing three CSV files containing item and premise data. Key functionalities include user registration, data visualization of item prices, a user-friendly interface for item selection, and a shopping cart feature. Additional challenges suggest enhancements like a graphical user interface, database integration, and geographical suggestions for price comparisons.

Uploaded by

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

WIX1002 Assignment Topic 1

The document outlines a project for creating a Price Comparison program for Thrifty Timmy, which involves utilizing three CSV files containing item and premise data. Key functionalities include user registration, data visualization of item prices, a user-friendly interface for item selection, and a shopping cart feature. Additional challenges suggest enhancements like a graphical user interface, database integration, and geographical suggestions for price comparisons.

Uploaded by

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

Price Tracker

1 Introduction
Thrifty Timmy is a cheapskate and would like to get the best bang for his buck. He noticed that the same item
might be sold for different prices at different places, even different prices at different times in the same place.
Although he is as price savvy as one could be, he is not very good at programming and would require a team
of geniuses (like you) to create this project.

2 Problem Statement
Three CSV files are needed for this project. CSV stands for comma separated values, meaning the values are
separated by a comma as delimiter. Each line is a row and each value in the row is a column value. Sound
familiar? It is basically Excel. In fact, opening CSV files on a windows computer will open it in excel. The first
row of the CSV file usually contains the column labels.
Please download the necessary files from the following links 1 :
1. https://storage.data.gov.my/pricecatcher/lookup_item.csv
2. https://storage.data.gov.my/pricecatcher/lookup_premise.csv
3. https://storage.data.gov.my/pricecatcher/pricecatcher_2023-08.csv
File Description
1. lookup item.csv
This file contains the relationship between item code and item description.
• item code
• item
• unit
• item group
• item category
Do take note that items might have the same name but different variations. For example, there are two
‘MILO (PAKET)’ with the same name but with different variations of ‘400g’ and ‘1 Kg’.
2. lookup premise.csv
This file contains the relationship between premise code and premise description.
• premise code
• premise
• address
• premise type
• state
• district
3. pricecatcher 2023-08.csv
This file contains the relationship between date, premise code, item code, and price in August 2023.
• date
• premise code
• item code
• price

1 Data retrived from : https://data.gov.my/


You are required to create a Price Comparison program.
Basic Functionalities (Total 8 marks)
1. Login/Registration (1 mark)
Allow the user to register a new account and store his personal details. You will need to store the user
details locally (for basic feature).
2. Read the three CSV files above and store the data into classes. (1 mark)
You will need to design the appropriate class structure to store the data. (You do not necessarily need
to follow the storing format of the CSV files). Your class structure should be efficient in assisting you in
performing the rest of the tasks.
Note: You might need to do some data handling to avoid error as some of the data points might not exists
in another file.
3. Item visualisation
(a) Display the top five cheapest sellers for a particular item. (0.5 mark)
For example, the user selected ‘MILO (PAKET) 1KG’, the program should display the seller based
on the lowest prices.
1 Top 5 Cheapest Sellers for MILO ( PAKET ) 1 KG
2
3 1. Retailer A
4 Price : $XXX . XX
5 Address : 123 Main St , City , State , ZIP
6
7 2. Retailer B
8 Price : $XXX . XX
9 Address : 456 Elm St , City , State , ZIP
10
11 3. Retailer C
12 Price : $XXX . XX
13 Address : 789 Oak St , City , State , ZIP
14
15 4. Retailer D
16 Price : $XXX . XX
17 Address : 101 Pine St , City , State , ZIP
18
19 5. Retailer E
20 Price : $XXX . XX
21 Address : 202 Maple St , City , State , ZIP

(b) Display a chart showing the price trend of a particular item across the day in a month. (0.5 mark)
You can calculate the price by averaging all the sellers for a particular day. Below is just an example,
you may come up with better/ more interesting charts.
1 Price Trend Chart for XXX
2
3 Days | Price
4 --------------
5 01 | $$$ (8.00)
6 02 | $$$$ (8.10)
7 03 | $$$$$ (8.20)
8 04 | $$$ (8.00)
9 05 | $$$$ (8.10)
10 06 | $$$ (8.00)
11 07 | $$$$$ (8.20)
12 08 | $$$ (8.00)
13 09 | $$$$$ (8.20)
14 10 | $$$$ (8.10)
15 11 | $$$ (8.00)
16 12 | $$$ (8.00)
17 13 | $$$$$ (8.20)
18 14 | $$$$ (8.10)
19
20 Scale :
21 $ = RM 0.10

4. User Interface
(a) Allow the user to modify the account details (change password/ change username) (0.5 mark)
(b) Create a selection screen based on item categories. (0.5 mark)
Since there are 756 different items (including variations), user would go crazy if the user would need
to select the item one by one from the list. You can create categories and sub-categories based on
‘item group’ and ‘item category’ in lookup item.csv.
(c) Create a search function to allow user to search for a specific item. (exact search is fine) (0.5 mark)
1 PriceTracker - Track Prices with Ease
2
3 Welcome to Product Search and Selection
4
5 1. Import Data
6 2. Browse by Categories
7 3. Search for a Product
8 4. View Shopping Cart
9 5. Account Settings
10 6. Exit
11
12 Enter your choice (1/2/3/4/5/6) : 2
13
14 Select a Category :
15
16 1. BARANGAN BERBUNGKUS
17 2. BARANGAN KEDAI SERBANEKA
18 3. BARANGAN KERING
19 4. BARANGAN SEGAR
20 5. BARANGAN SIAP MASAK
21 6. MINUMAN
22 7. PRODUK KEBERSIHAN
23 8. SUSU DAN BARANGAN BAYI
24 9. Back to Main Menu
25
26 Enter your choice : 8
27
28 Select sub category :
29 1. LAMPIN PAKAI BUANG
30 2. MAKANAN BAYI
31 3. SUSU BAYI
32 4. Back to Main Menu
33
34 Enter your choice :

5. User Experience
(a) Display selected item details and allow the user to modify the item details in the CLI (0.5 mark)
1 Selected CILI AKAR HIJAU .
2
3 Select actions :
4 1. View item details
5 2. Modify item details
6 3. View top 5 cheapest seller
7 4. View price trend
8 5. Add to shopping cart

(b) Create a shopping cart to allow user to add multiple items. (0.5 mark)
User can view the cheapest seller for all selected items in the shopping cart.
(c) Suggest the cheapest shop that contains all the items selected. (1.5 marks)
User might select and add 10 items into the shopping cart. It would be unwise to go to 10 shops just
to buy 1 item in each shop. Thus, the application should suggest the minimal number of shops to
visit that offer the lowest overall price. You should prioritise the number of shops to visit.
For example, if you can (1) buy all 10 items in Shop A with price RM 100; (2) all 10 items in Shop
B with price RM 120. You should choose (1).
However, if you can (1) buy 9 items in Shop A and 1 item in Shop B with price RM 200; (2) buy 8
items in Shop A, 1 item in Shop B, 1 item in Shop C with price RM 150. You should choose (1).
You should also include a filter to only show shops in a specific district. (i.e. only search for shops
in KL)
1 Shopping Cart
2
3 1. View cheapest seller for all selected items
4 2. Find shops to buy items in cart

6. Data Storage (1 mark)


You will need to store user details (username/ passwords), shopping cart info, item data (you may store
all the CSV data or just the items the user have modified) locally. The program should automatically
retrieve these data the next time you open it.
(Hint: You can use either CSV or JSON to store your data, The use of SQL database can be considered
as extra feature.)

3 Additional Challenges
Total 4 marks.
Note: You do not need to implement all 4 challenges to get 4 marks. 1 very very impressive or 2 impressive
implementations are enough to get the full marks.
1. Graphical User Interface
Let’s be honest, CLI is difficult to use and not user friendly. You can make your program more attractive
by creating a beautiful user interface. (Tips. JavaFX, Swing) You can also improve the chart visualisation
instead of using ugly CLI graphs.
2. Database
Users should be able to save their shopping cart and get back their selections when they reopen the
application. Also, the user should just only import the data once. You can use relational database such as
MySQL or Oracle DB, or NoSQL database such as MongoDB or Redis. Better still, make your database
online hosted.
3. 2 Factor Authentication
It is always a good idea to be on the safe side, you can’t be too careful these day. You can implement 2FA
using email (Hint: STMP protocol). Besides that, what if user forgets the login details? The application
should send the user a password recovery link.
4. Fuzzy Search
Nobody really remembers the exact name of each item. Can you implement a search function that is able
to match the item based on the item’s partial name or matching the item even when the user has some
typo? (Tips: you can explore similarity algorithms)
5. Geographical suggestions
Prices in Sabah will not matter to me if I live in KL. The program should suggest the shops near where
I am living based on exact geographical coordinates and only compare the prices of those shops. (Tips :
You can calculate the distance between two points and get the latitude and longitude coordinates from
address using Google Maps API)
6. Fully fledged shopping application
Go take inspiration from Shopee/ Lazada/ TikTok Shop/ Amazon. Make this application a fully functional
shopping application.
7. Anything else you find interesting.

4 Questions
You are welcome to use ANY external libraries to assist you in completing this project (for both basic require-
ments and additional challenges). You might find Apache Maven/ Gradle useful in package management.
Notes and comments across the code to explain what is going on will be much appreciated. (This is also good
practice when writing code)
If you are not clear about the project, you can contact TAY QI XIANG (tayqixiang@gmail.com).

You might also like