辅导案例-ISYS2047-Assignment 2

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
ISYS2047 –Information Systems Solutions and Design – Semester 2 2019

© France Cheong 2019


1
Assignment 2
Develop a Transaction Processing System

Note: This is an individual assignment.
1 Due dates
This is a multi-part assignment due over 3 milestones:
• Milestone 1 – due in week 7
• Milestone 2 – due in week 9
• Final milestone – due in week 11
All milestones must be demonstrated to your tutor during your assigned lab classes and a
zipped copy of your work submitted to Canvas.
2 Marks
The total assignment is worth 35% of the course marks. The individual milestones are worth:
• Milestone 1 – 5% of course marks
• Milestone 2 – 10% of course marks
• Final milestone – 20% of course marks
3 Background
The focus of the course is the development of transaction processing systems (TPS) as desktop
applications.

A case study (the Procurement System) was developed and used to illustrate the components that
make up a TPS and the tools and techniques used for building such a system.

In this assignment, you are required to develop a TPS using the same tools and techniques
taught during the course.
4 Requirements
4.1 System to Implement

You will be provided with the details of the system to implement by the course coordinator in
week 5 of the semester. This will be communicated as either as an individual message delivered
ISYS2047 –Information Systems Solutions and Design – Semester 2 2019

© France Cheong 2019


2
to your Canvas Inbox or an Outlook email to your student account. Please note that different
students will be assigned different case studies.

You are required to implement the system as a desktop application using the python tkInter
library (warning: we are not building a web site or a mobile app, so please pay careful
attention to what we are doing in the course).

The detailed requirements of each milestone are specified in the next sections.


ISYS2047 –Information Systems Solutions and Design – Semester 2 2019

© France Cheong 2019


3
4.2 Milestone 1 Requirements – Design Documentation

You are required to implement the following deliverables for milestone 1:
• Narrative: A narrative of the TPS with the following sections in no more than 2-3 slides
(detailed instructions can be found in Lab Task 5.1):
1. Introduction
2. Purpose of system
3. Description
4. Entities present in system
• ERD: A database model drawn as an Entity-Relationship Diagram (detailed instructions
can be found in Lab Task 5.2)
• GUI Mockups: A prototype of the TPS consisting a set of Balsamiq screen mockups
(detailed instructions can be found in Lab Task 5.3). Please do not design web sites or
mobile apps – pay careful attention to the instructions in lab task 5.3.
A sample of all these requirements were discussed in detail in lecture 5 - do not deviate from
what was explained in the lecture.

The submission for this milestone is a single PowerPoint file (i.e. no Word or PDF files)
containing all 3 requirements to be uploaded to Canvas before the start of your assigned lab class
in week 7.

Show the PowerPoint file to your tutor during your demo in the lab class.

You are strongly advised to check the rubric used for grading this milestone on Canvas.

Note: If you designed your GUI mockups as a web site or a mobile app, your work will be
graded as “Poor and/or largely incomplete”.

ISYS2047 –Information Systems Solutions and Design – Semester 2 2019

© France Cheong 2019


4
4.3 Milestone 2 Requirements – Database Creation and Data Access

You are required to perform 3 tasks for this milestone:
1. Write Python code to create the database containing all the tables for your TPS.
Detailed instructions can be found in Lab Task 6.2. Before you can attempt Lab Task
6.2, you will need to complete Lab Tasks 6.0 and 6.1.

No need to implement complex tables such as purchase_order and
purchase_order_item
These tables contain SQLAlchemy relationship() which might be too hard for many of
you to handle (especially when building the GUI)

populate_tables.py
Please note that you are not required to write a populate_tables.py script for this, unless
you want to use it to claim bonus marks in the final milestone. Furthermore, if you do
want to write a populate_tables.py script AND your tables contains a ‘date’ field (e.g.
date of birth, etc), check the populate_purchase_order.py script to find out how the date
field is populated.

populate_purchase_order.py
There is no need to implement such a script. It is provided as a sample file (especially for
the date field)

No need to use DB Browser for SQLite to enter records (used mainly to view records)
There is also no need to manually enter any records in the tables, as the test DAO script
in task 3 will handle this.

2. Write Python code to implement a data access object (DAO) for one of the tables.
3. Write Python code to test the DAO created in task 2.
Detailed instructions for steps 2 and 3 can be found in Lab Task 7.3. Before you can
attempt Lab Task 7.3, you will need to complete Lab Tasks 7.1 and 7.2.
You are required to submit the following files for milestone 2:
• A python script named schema.py defining all your database classes.
• A python script named create_tables.py for creating the tables of the TPS (this file was
provided to you and it does not require any changes).
• A python script named database.py for defining the location of your database and getting
a session (this file was provided to you and it does not require any changes).
• A python script named xxx_dao.py (where xxx is the name of a database table)
implementing CRUD methods for a particular table (any table will do). As a minimum,
ISYS2047 –Information Systems Solutions and Design – Semester 2 2019

© France Cheong 2019


5
the following methods should be implemented: create(), find_by_id(), find_all(),
find_ids, update() and delete()
• A python script named xxx_dao_test.py (where xxx is the name of a database table) for
testing the methods of your DAO.
The submission for this milestone is a single zip file containing all the python scripts and the
database (app.db) uploaded to Canvas before the start of your assigned lab class in week 9 and
demonstrated to your tutor during your lab class.

You are strongly advised to check the rubric used for grading this milestone on Canvas.

ISYS2047 –Information Systems Solutions and Design – Semester 2 2019

© France Cheong 2019


6
4.4 Final Milestone Requirements – Complete System

In the final milestone, you are required to continue writing Python code in the same folder
containing code for milestone 2.

You are required to perform the following tasks for this milestone:
1. Write Python code to implement one CRUD GUI for the table you implemented the
DAO and test DAO in milestone 2. Name the Python script as xxx_gui.py (where xxx is
the name of a database table). The GUI must have full CRUD capabilities for that table
and the data entered on the form must be validated. Detailed instructions can be found in
Lab Task 9.3. Before you can attempt Lab Task 9.3, you will need to complete Lab
Tasks 9.1 and 9.2.
Do not implement complex GUIs
Please note that you are not expected to implement complex GUIs such as the purchase
order GUI for performing CRUD operations simultaneously on two tables involved in a
one-to-many relationship.

When implementing the first GUI, choose a single simple table to implement it.

Implementing a GUI for a table that contains a ‘date’ field
Steps for handling a date field in your GUI code e.g. dob (date_of_birth)
1. Add this line to your imports

from dateutil.parser import parse
2. In your __init__ method, your date field should be StringVar()

self.dob = tk.StringVar()
3. In get_fields(), when passing your fields to the dictionary, use the following code to
get the date field from the GUI:

if self.dob.get():
d['dob'] = parse(self.dob.get())
else:
d['dob'] = None
4. If your validate_fields() method has any IF statements that checks the len() of your
date field, remove or comment it out. Otherwise skip this step.
5. In your populate_fields() method, use the following code to set the date field in the
GUI from the dictionary:

self.dob.set(xxxx['dob'].strftime('%d/%m/%Y'))
where xxx is the name of your dictionary
ISYS2047 –Information Systems Solutions and Design – Semester 2 2019

© France Cheong 2019


7

2. Write Python code to improve the validation class. You were provided with a validation
class (validation.py) and a test script (validation_test.py) in the course (week-09-
code.zip). You are expected to expand these Python files and improve on the validation
methods provided (e.g. phone number, email address) as these were not performing
correctly (in case you are using them). Alternatively, you could implement additional
validation methods. All the improvements/additions should be tested by adding additional
tests to the test script. Detailed explanation of the validation class can be found in
Lecture 9 and in the comments of the Python scripts validation.py and validation_test.py
in week-09-code.zip
3. Write Python code to implement a second CRUD GUI (including its DAO, and testing
the DAO). Name these Python scripts as yyy_dao.py, yyy_dao_test.py and yyy_gui.py
(where yyy is the name of a database table).
Please note that you are not expected to implement complex GUIs such as the
purchase order GUI for performing CRUD operations simultaneously on two tables
involved in a one-to-many relationship.

When implementing the second GUI, choose another single table to implement it.


4. Write Python code to implement a main menu for the application. Name the Python
script as zzz_main_gui.py (where zzz is the name of the system implemented) Detailed
instructions can be found in Lab Task 9.4.
5. Write Python code to implement one (or more reports). This is an optional requirement
and qualifies for bonus marks (if you scored less than 100% of the final assignment
marks). Reports were explained in Lecture 10 and Lab Tasks 10.1 and 10.2.
The complete submission for the assignment is a zip file containing the following:
• A PowerPoint file containing the requirements of the first milestone i.e. TPS narrative,
ERD and Balsamiq mockups. Also include the Balsamiq source file (i.e. the bmpr file).
This is either the same or an improved version of the PowerPoint file that was submitted
for milestone 1.
• An SQLite database for the application named app.db.
• All the python scripts implemented for the whole assignment (i.e. milestone 2 and final
milestone).

Coding standards

Code should be written using the PEP-8 python naming conventions and docstring comments
provided for all classes and methods.

Bugs in the provided code should be fixed
ISYS2047 –Information Systems Solutions and Design – Semester 2 2019

© France Cheong 2019


8

Code should be tested for boundary or extreme conditions and bugs fixed. For example, the
update() and delete() methods of the employee DAO will crash if a valid employee_id is not
supplied. In other GUIs, the load() method may crash if there are no records in the database. All
these methods should be properly tested for extreme conditions and any bug found should be
fixed.

Demonstrations

The final assignment is due in week 11 and should be demonstrated in week 11 during the lab
classes. However, if the demonstrations cannot be completed in week 11, they will continue in
week 12. The important thing to note is that all assignments are due in week 11 and should be
uploaded to Canvas in week 11.

Grading rubric

You are strongly advised to check the rubric used for grading this milestone on Canvas.

51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468