Diploma in Information Technology
Problem Solving
Instruction for CA3 Group Assignment
October 2024 Semester
Assessment
100 marks (This assignment constitutes 40% of the overall assessment)
Deliverables
There are Four (4) deliverables in this assignment, students must complete ALL
components.
1. Written project report (6%)
2. Python codes (20%)
3. User guides with sample inputs/outputs (4%)
4. Oral Presentation (10%)
The Task
The objective of this project is to allow students to design and implement a mini
program. You are to use flowchart to design your program, with clear steps and flows
indicated. You need to use Python programming language to code all the programs,
according to the project requirement.
In your report, write a brief description, in 500 words, on your program design. You
need to include flowcharts demonstrating the main program flow in the report. You will
also include screenshot samples on how the program should run in the report.
In your Python codes, include comments to explain the purpose of each section.
Assessment Marks Allocation
Component Assessed Marks Allocation
1 Part 1 – Report with flowchart 15
2 Part 2a – Main Programs (Python) 40
Part 2b – Additional Features 10
3 Part 3 – User guides with screenshots 10
4 Part 4 – Oral Presentation 25
Total 100
The Case - Go “MOBILE” Locker is coming to the campus.
The CEO of Go Locker has decided to explore the deployment of “MOBILE” lockers
to Nanyang Technological University (NTU).
With Internet making online shopping experience easy and enjoyable, the use of self service lockers has become popular and a possible business opportunity for Go
Locker to service students studying in big campus like NTU.
Currently in NTU, students can only one locker at a fixed location. However, with
student studying different modules each semester, not all lecture halls and classrooms
can be close to the locker location. Hence, a fixed location locker make it
inconvenience and troublesome to access, due to “tourism” and heavy human traffic
between lesson.
Combining the use of electric track transport system (not-in-scope), student can
access their “MOBILE” locker at any available Go Locker stations. For example,
students can request to “send” their lockers to a station nearest to their next lesson,
collect and store items before next lesson.
In the pilot phase, Go Locker will allow student to rent up to 2 lockers, at $2 per locker.
Student can release/return the locker anytime. Each request to move locker to a
specified station will incur 20 cents. When a locker is moved to the specified station,
student can proceed to access/open the locker.
As an intern in IMDA (Infocomm Media Development Authority), your supervisor has
assigned you to help Go Locker with this pilot project, with objectives to automate the
mobile locker rental and operations processes.
Project Requirement
After extensive discussions, Go Locker would like to have the following essential
features to be included:
System Admin functionalities that featured creation of station, locker,
updating of locker details, and reports for station, locker usage.
Station Operations/functionalities that include rent/return locker, request
locker moves, enquiring locker location and viewing of usage report.
Further features to be integrated in the application are configurable rental
fees, moving fees, and a background program to process the “moving” of
lockers (see BONUS features).
Based on you understanding, the pilot project will have 2 applications: one to allow
Go Locker administrators to perform administrative functionalities, and the other for
students to perform locker operations.
1. Go Locker – Admin
For the Go Locker administrators, the application should display the following
menu:
^^^^ Go Locker - Admin ^^^^
1. Setup station
2. Create locker
3. Update locker
4. View station report
5. Track locker usage
0. Exit
Enter option:
Before presenting the menus, your application needs to load/pre-setup the
stations, lockers, students from Appendix A and rentals (if any) into collections*.
* Your group can decide to implement using either Dictionary or List.
a. Setup station
This function allows the administrator to setup a new station.
To setup a new station, the following data elements should be collected:
Station Code: should be unique, in format of NTU-XXX-DD, where XXX
represents the building code (e.g., N21, S32), and DD represents digits
from 00 to 99.
Station Name: name description of the station (e.g., The Hive level 1, The
Arc level 2)
Rows: number of rows for this station
Columns: number of columns for this station
Status: Open or Closed
The maximum number of lockers for this station will be Rows X Columns.
Hence if station NTU-S32-01 has 4 rows and 20 columns, the capacity for
this station is 80 slots. Therefore, your application may need to include a
collection to represent the 80 slots. These slots will be empty, until student
request to move their locker into the station.
When a new station is created, the status should be defaulted to “Open”. The
new station will be added into the collection and updated into “Stations.txt”
file.
b. Create locker
Locker can be added into the system to meet the demand. To add a new
locker, these data elements should be collected:
ID: starting from 10001, increment by 1 for each new locker created
Location: “Central store”, “In transit”, or any valid station code. Defaulted
to “Central store” at creation.
Row: default to empty/zero unless the locker is in a station.
Column: default to empty/zero unless the locker is in a station.
Status: “Occupied”, “Available” (default), “Suspended”.
Rental ID: if “Occupied”, need to record the rental ID.
When a new locker is created, then locker should be added into the collection
and updated into “Lockers.txt” file.
c. Update locker
The “Update Locker” option allows the administrator to update the locker’s
details:
User should first provide the locker ID to search.
If there is no locker with this ID, display appropriate error message and
return to menu.
If the ID is valid, your program should display the locker details, and if
occupied, the student ID, student name and date started renting this
locker.
Only allow update to Location and Status.
However, status can only be updated to “Suspended” when current Status
is “Available”. When updating Status from “Occupied” to “Available”, the
rental record needs to be terminated.
Any updates should also be affected into “Lockers.txt”
d. View station utilization report
The option allows the administrator to view the current station utilization.
User should first provide the station code to search.
If there is no station with this code, display appropriate error message and
return to menu.
If the station code is valid, your program should display the station details,
and a table showing all the slots (rows x columns) – with locker IDs for
those slots that contain the students’ lockers.
e. Track locker usage
The option allows the administrator to track the operations of a specific locker.
User should first provide the locker ID to search.
If there is no locker with this ID, display appropriate error message and
return to menu.
If the ID is valid, your program should display the locker details, and if
occupied, the student ID, student name and date started renting this
locker.
Your application should ask for the Date-From and Date-To, before
generating the report containing all operations for this locker during the
specified dates.
Below is a demonstration of the generation of “Track locker usage” report:
Enter Locker ID: 10002
Locker ID: 10002
Location: Central Store
Status: Occupied
Student ID: 10256499
Student Name: See Sin Ho
Rental Start Date: 14-Sep-2024
Enter Date-From: 14-Aug-2024
Enter Date-To: 15-Oct-2024
Date Time Operation Student ID
-------------------------------------------------------------
15-Aug-2024 12:33 Locker return 10255884
15-Aug-2024 12:34 Move to Central Store -
14-Sep-2024 09:11 Locker rental 10256499
14-Sep-2024 10:23 Move to NTU-S31-06 10256499
14-Sep-2024 10:45 Move to Central Store -
14-Sep-2024 14:55 Move to NTU-N21-02 10256499
14-Sep-2024 15:10 Move to Central Store -
18-Sep-2024 09:01 Move to NTU-S32-06 10256499
18-Sep-2024 09:08 Move to Central Store -
-------------------------------------------------------------
2. Go Locker - Operations
For the students, the application should display the following Operations menu:
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option:
Before presenting the menus, your application needs to load/pre-setup the
stations, lockers, students from Appendix A and rentals (if any) into collections*.
* Your group can decide to implement using either Dictionary or List.
a. Rent a locker
To rent a locker, students only need to provide their student ID.
If the ID is valid, your program should display rented locker details (if any),
and if student is renting 2 lockers now, display appropriate error message
and return to menu.
If student can still rent a locker, your program will locate an available
locker and create the rental transaction, charging $2 to the student
account.
Rental transaction should include the locker ID, student ID, start date and
end date (default to None, until the rental is terminated).
Your program should generate a unique Rental ID (running number) and
display the rental details.
Below are demonstrations of a locker rental:
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 1
Enter Student ID: 10255884
---------------------------------------------------------
Locker allocated: 10002 Location: Central store
Rental ID: 2400102
Start date: 14-Sep-2024
$2 is charge to your account.
---------------------------------------------------------
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 1
Enter Student ID: 10256499
Sorry, you are already renting 2 lockers.
---------------------------------------------------------
Locker allocated: 10003 Location: NTU-N31-04 (2-05)
Rental ID: 2400101
program、Python Start date: 10-Sep-2024
---------------------------------------------------------
Locker allocated: 10001 Location: Central store
Rental ID: 2400099
Start date: 15-Aug-2024
---------------------------------------------------------
b. Request move
To start moving a locker, the student ID and locker ID must be provided:
Your program must validate both student ID and locker ID.
If the IDs are valid, your program should display rented locker details.
If not, display appropriate error message and return to menu.
Prompt for the station code to move to.
Create the move transaction record if,
The station code is valid and is not same as current location.
The destination has slots for this locker, hence displaying “Station
Code (Row-Column)” for this move. For example, “NTU-N31-04 (1-09)”
Below are demonstrations of a locker move:
++++ Go Locker – Operation ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 2
Enter Student ID: 10255884
Enter Locker ID: 10003
Sorry, 10003 is not your locker.
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 2
Enter Student ID: 10255884
Enter Locker ID: 10002
---------------------------------------------------------
Locker allocated: 10002 Location: Central store
Rental ID: 2400102
Start date: 14-Sep-2024
---------------------------------------------------------
Enter Station code to move to: NTU-N31-04
Locker is moving to NTU-N31-04 (1-09)
---------------------------------------------------------
Locker allocated: 10002 Location: In transit
Rental ID: 2400102
Start date: 14-Sep-2024
---------------------------------------------------------
c. Return locker
Student can return a locker by providing the student ID and locker ID:
Your program must validate both student ID and locker ID.
If the IDs are valid, your program should display rented locker details.
If not, display appropriate error message and return to menu.
Prompt for confirmation to return the locker.
Closed the rental record by updating the end date to current date, update
the locker status to “Available” and rental ID for this locker will be None.
If the current location of the locker is at any station, system will initiate a
locker move transaction to “Central store”.
Your program should present a usage statement for this rental.
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 3
Enter Student ID: 10255884
Enter Locker ID: 10002
---------------------------------------------------------
Locker allocated: 10002 Location: NTU-N31-04 (1-09)
Rental ID: 2400102
Start date: 14-Sep-2024
End date: 10-Oct-2024
Moving locker back to Central store.
---------------------------------------------------------
Rental charge: $2.00
Move charges: $2.00 (10 moves)
Penalty charges: $2.00 (2 counts)
Total charges for this rental: $6.00
---------------------------------------------------------
d. Enquire locker location
To find out where the student’s lockers are, student need to provide their
student ID.
Your program should display appropriate error message if there is no
student matching the student ID, or currently no rental record for this
student.
If the “active” rental record(s) is located, display the locker(s) details.
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 5
Enter Student ID: 10256379
No rental records
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 4
Enter Student ID: 10256499
---------------------------------------------------------
Locker allocated: 10003 Location: NTU-N31-04 (1-09)
Rental ID: 2400101
Start date: 10-Sep-2024
---------------------------------------------------------
Locker allocated: 10001 Location: Central store
Rental ID: 2400099
Start date: 15-Aug-2024
---------------------------------------------------------
e. View usage report
Student can view locker usage report by first providing the student ID:
Your program should display appropriate error message if there is no
student matching the student ID; or has no rental record for this student.
If the rental record(s) is located, display the locker(s) details.
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 4
Enter Student ID: 10256379
No rental records
++++ Go Locker – Operations ++++
1. Rent a locker
2. Request move
3. Return locker
4. Enquire locker location
5. View usage report
0. Exit
Enter option: 4
Enter Student ID: 10256499
---------------------------------------------------------
Locker allocated: 10003 Location: NTU-N31-04 (1-09)
Rental ID: 2400101
Start date: 10-Sep-2024
---------------------------------------------------------
Locker allocated: 10001 Location: Central store
Rental ID: 2400099
Start date: 15-Aug-2024
---------------------------------------------------------
Locker allocated: 10006
Rental ID: 2400084
Start date: 10-Jul-2024
End date: 20-Sep-2024
---------------------------------------------------------
Enter Rental ID to view usage: 2400099
Date Time Operation Student ID
-------------------------------------------------------------
14-Sep-2024 09:11 Locker rental 10256499
14-Sep-2024 10:23 Move to NTU-S31-09 10256499
14-Sep-2024 10:45 Move to Central Store -
14-Sep-2024 14:55 Move to NTU-N21-11 10256499
14-Sep-2024 15:10 Move to Central Store -
18-Sep-2024 09:01 Move to NTU-S32-01 10256499
18-Sep-2024 09:08 Move to Central Store -
-------------------------------------------------------------
Rental charge: $2.00
Move charges: $0.60 (3 moves)
Total charges for this rental: $2.60
-------------------------------------------------------------
To show your ability in coding, your supervisor gave you the flexibility to design the
structure and interface. Now, you shall apply what you have learnt in the school into
practice.
More (BONUS) features for consideration:
You should explore problem solving techniques to design a solution to allow:
a. Dynamic, configurable setup of rental fees and moving fees. Aim is not to re code and restart application for any changes to rental fees and moving fees.
b. Have a background program processing the locker move requests.
When a student request for a locker moves, this transaction will be
recorded and processed by your background program.
The locker location will be updated accordingly after 3 min, simulating the
movement of the locker vis the electric track delivery system.
Hence, it will be “In transit”, follow by e.g., “NTU-N32-11” after 3 min.
Locker move requests can also be initiated by the system, 30 min after
the locker has arrived at a station. This is to manage space/slot, ensuring
there are slots at each station to serve students.
Instructions for CA3 Report, Python Codes and User Guides
Cover Page
The cover page should include the institution name (and institution logo) the
programme and the module name, the semester and year and date of submission. All
these must be centralised in the page.
Write FULL Name and Student number as in the register on the cover. Students should
a keep a copy of assignment submitted.
Python Codes
Suggested IDE and version: Wing Personal 7, Python 3.8.2 and above.
Please zip all your Python codes into single file and upload it together with the report.
If you used any additional Python library apart from the standard package, you need
to include them in the submission.
Referencing
No referencing is needed for program designs and codes.
Font and Spacing
Font: Times New Roman
Font size: 12 and 1.5 for line spacing.
Penalty Marks for Late Submission of Assignment
By one day: 20% to be deducted from total marks.
More than one day: submission will NOT be graded.
Plagiarism and Collusion
Students are not allowed to reuse old assignments or submit projects from previous
semesters or copy from sources, particularly from the Internet web.
The submitted report must show evidence that this is students’ own work. No marks
will be awarded if there are no workings or reasonable explanations. Please be
reminded that plagiarism and collusion is a serious offence, and all cases will be
referred to the administration. Grades will be withheld if the submission is suspected
of plagiarism or collusion till investigations are completed.
Important Dates of CA3 Report
CA3 Group Assignment Deadline: 11 November 2024 11.59 am.
Submit ONE project via Canvas per group, submission must be completed for reports
to be graded.
Lecturer Contact
You should contact your lecturer via your SIM email whenever you have any issue
about your project.
Appendix A
List of stations in NTU
Station Code Station Name Rows Columns Status
NTU-ADB-01 Admin Building level 1 4 10 Open
NTU-N21-02 North Main Spine level 1 3 15 Open
NTU-N22-03 North Main Spine level 2 4 12 Open
NTU-N31-04 The Arc level 1 3 10 Open
NTU-N32-05 The Arc level 2 4 10 Closed
NTU-S31-06 The Hive level 1 3 15 Open
NTU-S32-06 The Hive level 2 4 15 Open
NTU-SSC-07 SSC level 2 4 12 Open
List of lockers in NTU
Locker ID Location Rows Columns Status Rental ID
10001 Central store Available
10002 Central store Available
10003 Central store Available
10004 Central store Available
10005 Central store Available
10006 Central store Suspended
10007 Central store Available
10008 Central store Available
10009 Central store Suspended
10010 Central store Available
10011 Central store Available
List of students participating in this pilot with Go Locker
Student ID Student Name Account
10252746 James Loong 0.00
10251327 Felix Lim Jun Yu 0.00
10250055 Johan Agarwal 0.00
10256499 See Sin Ho 0.00
10253012 Benjamin Wong 0.00
10254027 Kit Cong Chen 0.00
10255884 Ian Tan 0.00
10251668 Javier Huang 0.00
10255540 Wei De Joel Lam 0.00
10252730 Mudit Sarmiento 0.00
10253442 Yi Hong Goh 0 Java Python
相关推荐
拆解一个800G光模块:手把手带你认识里面的MT插芯和光纤阵列(FA)
本文详细拆解了800G光模块中的关键组件MT插芯和光纤阵列(FA),揭示了并行光学技术如何实现高速数据传输。通过显微镜下的精密观察,展示了MT插芯的高精度构造和光纤阵列的连接奥秘,同时解析了高精度研磨工艺对光信号传输的重要性。这些微型组件是高速收发模块实现800Gbps带宽的核心技术。
使用Python Git Program Launcher提升你的开发效率
使用Python Git Program Launcher提升你的开发效率 在编程世界中,工具的智能化和高效性是提升生产力的关键。今天,我要向大家推荐一个名为Python Git Program Launcher(PGPL)的项目,它是一个强大的命令行工具,旨在帮助开发者更加便捷地启动和管理Git仓库中的程序。该项目由Infstellar团队创建并维护,。 项目简介 PGPL的核心功能是让你通过简...
WorkBuddy 集成 飞书CLI,全程10分钟,丝滑无比,老板要注意了...
飞书CLI实测:10分钟实现AI操控飞书办公 飞书CLI作为命令行工具,让用户通过简单命令完成飞书各项操作。本文记录了从安装到使用的完整过程:一键安装仅需10分钟,支持200多条命令覆盖飞书全部功能,与AI结合后可实现自然语言办公。实测中成功用语音指令创建了7天发文计划日程,验证了其便捷性。虽然首次认证存在超时问题,但整体体验流畅。该工具将复杂操作简化为自然语言指令,大幅提升办公效率,特别适合需要频繁使用飞书的用户。后续还将探索更多自动化办公场景。
python-git-program-launcher 项目教程
python-git-program-launcher 项目教程 1. 项目的目录结构及介绍 python-git-program-launcher/ ├── config/ │ └── json_doc/ ├── docs/ ├── pgpl/ ├── translation/ ├── github/ │ └── workflows/ ├── c_launcher/ ├── DebugL...
Ubuntu 24.04 LTS安装WPS Office 2025冬季版全攻略(附字体缺失解决方案)
本文提供了在Ubuntu 24.04 LTS系统上安装WPS Office 2025冬季版的完整指南,详细对比了dpkg、Snap和GUI三种安装方式的优劣。针对安装后常见的中文字体缺失、思源黑体粗细异常等核心问题,给出了从原理分析到手动补充字体库、修改字体配置文件的深度解决方案,确保WPS Office在Linux环境下获得最佳使用体验。
高通thermal-engine.conf配置详解:从虚拟传感器到CPU频率控制的完整指南
本文深入解析了高通thermal-engine.conf配置文件的架构与调优方法。从虚拟传感器的加权融合原理,到监控算法与CPU频率控制的多级策略,提供了完整的配置详解与实战调试指南。文章旨在帮助开发者与高级用户掌握底层温控逻辑,在性能与散热间实现精准平衡,并详细介绍了日志调试与场景化配置等高级技巧。
pyspark on yarn 出现 Cannot run program python
pyspark \ --master yarn \ --name shell \ --driver-cores 1 \ --driver-memory 512m \ --num-executors 1 \ --executor-cores 1 \ --executor-memory 512m \ --verbose 使用pyspark运行在yarn上的时候,错误如下 Lost task 0.0 in stage 0.0 (TID 0, server, executor 1): java
Python3 ACM模式输入输出全攻略:从牛客网到华为机试的实战技巧
本文详细解析了Python3在ACM模式下的输入输出处理技巧,针对牛客网、华为机试等在线评测系统。文章从input()函数本质出发,总结了六种高频输入模式的处理模板,并提供了链表、二叉树等数据结构的I/O实战方案,最后给出性能优化与常见避坑指南,帮助开发者高效应对算法笔试。
python program是什么
1、概念 python program是程序的意思。程序就是数据结构+算法。 (1)算法 算法就是解决问题的方法,编程就是用代码解决一些现实中的问题的。 (2)数据结构 数据结构就比较深了,由最基础的顺序表引出链表,链表又引出树,树又引出图。 2、编写程序 我们说的编写 Python 程序,其实就是按照 Python 的语法,将你脑海中的任务翻译成程序代码,写到一个文本文件里。程序写好之后,由 Python 解释器来读取、翻译和执行你的代码逻辑,帮你完成任务。 3、程序执行原理 python.exe 启动.
PT:pt write_change to innovus 脚本
我正在「拾陆楼」和朋友们讨论有趣的话题,你⼀起来吧?
9、储备池学习:从学习到学习的新范式
本文探讨了基于学习到学习(L2L)框架的储备池计算新范式,提出通过在外循环中优化储备池的超参数(如递归连接权重、输入权重和读出初始化),以提升其在多种任务中的内循环学习性能。研究展示了两种主要实验设置:一是优化储备池用于回归二阶Volterra滤波器任务,显著优于随机基线;二是实现无需调整读出权重、仅依赖内部动态学习非线性函数的能力,表明储备池可快速构建目标函数的内部模型并安装任务先验知识。结合流程图与表格,文章系统呈现了L2L的训练流程、技术细节及实验结果,并讨论了性能提升、泛化能力等开放问题,指出了未来
错误:Cannot run program “C:\Users\....python.exe“
使用PyCharm运行程序时,出现Error running Program: Cannot run program "…\python.exe"这样的错误(xxx是你的项目名称)。 是由于在原来的工程目录下,保存了Python的编译环境,包括python.exe文件。工程目录移动到其他盘以后,工程设置中找不到python.exe程序,因此报错,需要修改设置。 处理办法: 1、在pycharm窗口点击文件—设置 或者 Ctrl + Alt + s,打开设置页面 2、选择python解释器 点击右侧设
Probability and Statistics - 4th edition
Probability and Statistics - 4th edition
program python
wrap=1)a. Run1/6timer t1;??t1.start();??and2/6else {long item;3/6else {to signal.uming.here.
Data-Structures-and-Algorithm-Analysis-in-Java.pdf
作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...
Statistics and Machine Learning Toolbox
Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具
本地化部署 DeepSeek,构建单细胞与空间转录组 AI 分析平台
本地化部署 DeepSeek,构建单细胞与空间转录组 AI 分析平台
1558



被折叠的 条评论
为什么被折叠?



