0% found this document useful (0 votes)
10 views87 pages

Smart Printing Service for HCMUT Students

Uploaded by

vuquynhhuong0611
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)
10 views87 pages

Smart Printing Service for HCMUT Students

Uploaded by

vuquynhhuong0611
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/ 87

Ho Chi Minh City University of Technology – VNU-HCM

Department of Software Engineering


Faculty of Computer Science and Engineering

SOFTWARE ENGINEERING (CO3001)

Software Requirements Specification For:


A smart printing service for
students at HCMUT

Instructor(s): Trương Tuấn Anh, CSE-HCMUT

Group: CC03-09

Student(s):
Trịnh Anh Minh - 2252493
Trần Xuân Hảo - 2252191
Vũ Quỳnh Hương – 2252286
Vũ Minh Quân – 2212828
Võ Cao Nhật Minh – 2252495
Trần Quốc Bảo Long – 2252453

HO CHI MINH CITY, NOVEMBER 2024


Software Requirements Specification for
A smart printing service student at HCMUT

Table Of Content
Revision History ............................................................................................................................ 2
1. Task 1: Requirement elicitation (1.1, 1.2) ............................................................................... 3
1.1 Domain Context .................................................................................................................. 3
1.2 Stakeholders and Needs ..................................................................................................... 3
1.3 Benefits of the System ......................................................................................................... 4
1.4 Functional Requirements ................................................................................................... 5
1.5 Non- Functional Requirements ......................................................................................... 7
2. Task 1: Requirement elicitation (1.3) ...................................................................................... 9
2.1 Use case Diagram for the Whole System .......................................................................... 9
2.2 Use case Diagram for Authentication ............................................................................. 10
2.3 Use case Diagram for Printer Management ................................................................... 14
2.4 Use case Diagram for Purchasing Paper ........................................................................ 18
2.5 Use case Diagram for Management Configuration ....................................................... 22
2.6 Use case Diagram for System Report .............................................................................. 29
2.7 Use case Diagram for Management Account ................................................................. 33
2.8 Use case Diagram for Printing Service ........................................................................... 38
3. Task 2: System modelling ....................................................................................................... 46
3.1 Actvity Diagram ................................................................................................................ 46
3.1.1 Change configuration for SPSO .......................................................................... 46

3.1.2 Display Uploading Files Page ............................................................................. 47

3.1.3 Uploading File for Student .................................................................................. 48

3.1.4 Printing Configuration for Student ...................................................................... 49

3.1.5 Printing Service for Students............................................................................... 50


3.2 Sequence Diagram ............................................................................................................ 51
3.2.1 Change configuration for SPSO .......................................................................... 51

3.2.2 Display Uploading Files Page ............................................................................. 53

3.2.3 Sequence Diagrams for Uploading Files ............................................................. 54

3.2.4 Sequence Diagram for Printing Service ............................................................. 55

3.2.5 Sequence Diagram for Printing Configuration for Students .............................. 57


3.3 Class Diagram ................................................................................................................... 60
3.3.1 PrintServiceView() .............................................................................................. 61

1
Software Requirements Specification for
A smart printing service student at HCMUT
3.3.2 PrintServiceController() ...................................................................................... 62

3.3.3 Student() .............................................................................................................. 62

3.3.4 Printer() ............................................................................................................... 63

3.3.5 Printer 1, 2, 3, 4, 5() - inheritance from the Printer ............................................. 63

3.3.6 Document().......................................................................................................... 63

3.3.7 PrintConfiguration() ............................................................................................ 63

3.3.8 PrintConfigurationView().................................................................................... 64

3.3.9 PrintingConfigurationModel() ............................................................................ 65

3.3.10 PrintingConfigurationController() .................................................................... 65

3.3.11 SPSO() ............................................................................................................... 65

3.3.12 Database().......................................................................................................... 65
3.4 User Interfaces using Figma ............................................................................................ 67
3.4.1 Main screen ......................................................................................................... 67

3.4.2 Pre-login screen ................................................................................................... 68

3.4.3 Login page ........................................................................................................... 68

3.4.4 Main menu for the student .................................................................................. 69

3.4.5 Print document page ............................................................................................ 70

3.4.6 Uploading file page ............................................................................................. 71

3.4.7 Uploaded file page .............................................................................................. 71

3.4.8 Confirm file to go to the configuration ............................................................... 72

3.4.9 Configuration file format page ............................................................................ 72

3.4.10 Invoice page ...................................................................................................... 73

3.4.11 Popup successfully print page ........................................................................... 74

3.4.12 System configuration page ................................................................................ 74

3.4.13 System config in use ......................................................................................... 75

3.4.14 Popup successfully save page ........................................................................... 76


2
Software Requirements Specification for
A smart printing service student at HCMUT
4. Task 3: Architecture design ................................................................................................... 77
4.1 Layered Architecture: ...................................................................................................... 77
4.2 Present User Interface: ..................................................................................................... 78
4.3 API management: ............................................................................................................. 78
4.4 Store Data: ......................................................................................................................... 79
4.4.1 SPSO: .................................................................................................................. 80

4.4.2 Student:................................................................................................................ 80

4.4.3 Printer: ................................................................................................................. 80

4.4.4 Document: ........................................................................................................... 80

4.4.5 Paper_Transaction: .............................................................................................. 81


4.5 Deployment Diagram: ...................................................................................................... 81
4.6 Component Diagram: ....................................................................................................... 82
4.6.1 View: ................................................................................................................... 83

4.6.2 Controller: ........................................................................................................... 83

4.6.3 Model: ................................................................................................................. 84

4.6.4 Database: ............................................................................................................. 84

3
Software Requirements Specification for
A smart printing service student at HCMUT

Revision History

Name Date Reason For Changes Version

Printing Service September 22nd 2024 Update task 1.1, 1.2 1.0

Printing Service October 1st 2024 Update task 1.3 1.1

Printing Service October 27th 2024 Update task 2 1.2

Printing Service November 15th Update task 3 1.3

2
Software Requirements Specification for
A smart printing service student at HCMUT

1. Task 1: Requirement elicitation (1.1, 1.2)


1.1 Domain Context

The Student Smart Printing Service (HCMUT_SSPS) is a system designed to help


students print documents on campus through a web-based and mobile app. The key entities of
this system are Students, University Administrators, School IT Administrators, Printer
Manufacturer and the Student Printing Service Officer (SPSO). The system allows
students to upload documents, select printers, and specify printing properties such as paper
size, single or double-sided printing, and the number of copies. Each print job records details
like student ID, printer ID, file name, start and end times, and the number of pages printed.
The print history is automatically deleted after a set period, and printing activity is restricted
based on a student's department and managed by department-specific administrators or the
central manager.

The system includes a feature where students can purchase additional printing pages
through BKPay once their balance is depleted. Every print job checks the remaining page
balance, and page allocation is managed by the SPSO, who configures limits such as 1 A3
page equaling 2 A4 pages. The SPSO also controls the default number of pages issued to
students each semester, manages file types allowed for printing, and can view monthly and
yearly usage reports generated by the system. The system is highly customizable, enabling the
SPSO to activate or deactivate printers and adjust the printing configurations as needed.

To ensure security, all users, including students and administrators, must authenticate
through the HCMUT_SSO service before accessing the system. This maintains the integrity
and privacy of the system, ensuring that only authorized users can access printing services.
The system’s design ensures efficient management of resources while making it easy for
students to print documents across campus.

1.2 Stakeholders and Needs

The HCMUT-SSPS (Student Smart Printing Service) gives services and is maintained
to support users. Therefore, there are stakeholders in this system corresponding to their needs.

The first stakeholder is the Students. They are the main users of the system: uploading
documents, selecting printers, specifying printing properties, etc. They can also view their
printing log for a time period together with a summary of the number of printed pages for

3
Software Requirements Specification for
A smart printing service student at HCMUT

each page size and require the printing and BKPay app to be easy to user-friendly, flexible
and reliable.

The second stakeholder is the Student Printing Service Officer (SPSO), who is in
charge of permitting and configuring certain file types, traversing and monitoring the printing
history of students for a time period (date to date) and for all or some printers. The officer is
provided the permission to manage printers such as add, enable, disable a printer. The officer
also manages other configurations of the systems such as changing the default number of
pages, the dates that the system will give the default number of pages to all students, the
permitted file types accepted by the system. The reports of the use of the printing system is
viewed by SPSO. A user-friendly and reliable managing app is also required by the SPSO.

The third stakeholder is the University Administrators, which decides the default number of
A4-size pages each student has.

The Printer Manufacturer is another stakeholder. The manufacturer is responsible


for providing printers, maintenance services if such needs arise.

The last stakeholder is the School IT Administrators. The IT administrators manage the
HCMUT_SSO authentication service. They will provide access to users via the authentication
service and are also responsible for the maintenance and development of the system. The
admins must make sure that the web-based app and mobile app works correctly and available
at all times and without errors.

1.3 Benefits of the System

The HCMUT-SSPS (Student Smart Printing Service) offers multiple benefits to


various stakeholders. For students, the system provides convenience and efficiency by
allowing them to print documents from any campus location, track their printing history, and
manage their page quota. This service reduces the need to locate specific printers or manually
handle print jobs, which streamlines their academic workflow. Additionally, students have
flexibility to purchase extra pages when needed, which ensures uninterrupted printing service.
According to studies on self-service systems in education, such functionalities increase
student satisfaction and reduce administrative burden.

For the Student Printing Service Officer (SPSO), HCMUT-SSPS offers a


centralized management system, allowing real-time monitoring of printer performance and
usage logs. The ability to manage printer configurations and access detailed reports helps the
4
Software Requirements Specification for
A smart printing service student at HCMUT

SPSO maintain efficiency and optimize resource distribution. Automated reporting tools
reduce the workload of manual data collection, while configurable settings—such as page
quotas and file types—ensure adaptability to evolving student demands. Effective
management of such services has been shown to increase operational efficiency in university
environments.

For University administrators, the system generates valuable insights through


periodic reports on printer usage, which aid in decision-making processes, such as budgeting
and resource allocation. By supporting seamless printing services, the system enhances the
university’s infrastructure and promotes a tech-enabled campus environment. This aligns with
the broader trend of universities adopting smart technologies to improve service delivery and
student satisfaction. Furthermore, integrating online payment systems like BKPay streamlines
revenue collection for additional printing services, providing a financial model that supports
both sustainability and growth.

For Printer Manufacturers, manufacturers benefit from the system's centralized


printer management, which allows early detection of issues such as low ink levels or paper
shortages. This ensures prompt maintenance and servicing, extending the lifespan of printers
and reducing the risk of downtime. The system's usage data also helps manufacturers optimize
their support and service offerings.

For School IT Administrators, IT administrators play a critical role in ensuring the


HCMUT-SSPS system's availability and security. By integrating the HCMUT_SSO
authentication system, IT administrators ensure that only authorized users access the system.
Additionally, they oversee system maintenance and troubleshooting, ensuring that both the
web-based and mobile apps function efficiently. This ensures a smooth and secure printing
experience for all users.

1.4 Functional Requirements

Students:

1. Upload documents to print.

2. Choose between black-and-white printing and color printing.

3. View printing history, including usage details like number of papers, files, etc.

4. Access a predefined quota of free prints per semester.

5
Software Requirements Specification for
A smart printing service student at HCMUT

5. Pay for additional prints beyond the free quota via the BKPay system.

University Administrators:

1. Manage accounts - they can create, suspend or delete student accounts.

2. Check the printer status, like ink and paper levels.

3. Adjust default number of A4-size pages for printing.

4. Adjust (decrease/increase) prices for the number of pages.

5. Generate usage statistics reports (number of students, amount of paper used,


revenue…)

School IT Administrators:

1. Grant students access to the system through the HCMUT_SSO authentication service.

2. Receive feedbacks about the system.

3. Ensure that user data and system logs are securely stored and protected from
unauthorized access.

4. Troubleshoot system-related issues, ensuring all system functionalities operate


correctly (e.g., file uploads, payment processing).

5. Update and maintain system infrastructure, including software updates for security and
compatibility with new devices.

Printer Manufacturer:

1. Provide updates to ensure compatibility between the system and new printer models.

2. Monitor and receive alerts for printer maintenance needs such as low ink levels, paper
jams, or hardware failures.

3. Conduct periodic system maintenance to optimize printer performance.

4. Provide remote troubleshooting assistance when printers encounter issues.

5. Provide instructions and installation manuals.

Student Printing Service Officer (SPSO):

1. Manage printers such as add, enable, or disable a printer.

6
Software Requirements Specification for
A smart printing service student at HCMUT

2. Manage configurations of the system (changing number of pages, the dates that the
system will give the default number of pages to all students, the permitted file types
accepted by the system).

3. Permit file types for printing (.jpg, .png, .pdf, .doc…)

4. View the reports of the use of the printing system.

5. Generated automatically at the end of each month and each year, stored in the system.

6. View the printing history (log) of all students or a student for a period (6 months) and
for some/all printers.

1.5 Non- Functional Requirements

Performance Requirements:

1. The system shall display printing logs within 2 seconds.


2. The system shall respond to printing requests within 2 seconds.

Security Requirements:

1. Students shall authenticate themselves using the school account granted to them by the
university.
2. The system shall ensure that only authenticated and authorized students and SPSO
have access to their respective functionalities.
3. The system shall limit access to printer management and configuration settings to the
SPSO only.

Usability Requirements:

1. The system’s user interface shall be intuitive and user-friendly, both on the web-based
app and mobile app.
2. The system shall provide clear error messages and instructions when user actions fail
(e.g., insufficient page balance, unsupported file format).

Reliability and Availability Requirements:

1. The SSPS shall be available for printing to all students during normal working hours
(Mon–Fri, 08:30–17:30).
2. Downtime within normal working hours shall not exceed five seconds in any one day.
3. The log and reports shall be available for viewing at any time.
7
Software Requirements Specification for
A smart printing service student at HCMUT

4. The system shall save the logs of all students for up to 6 months.

Scalability Requirements:

1. The system shall be scalable to support up to 10 additional printers as needed without


degradation of performance.
2. The system shall be able to handle up to 1,000 simultaneous users, including both
students and SPSO.

Compatibility Requirements:

1. The system shall be compatible with all major operating systems, including Windows,
macOS, Linux, iOS, and Android, for both the web and mobile applications.
2. The web-based app shall support and function correctly on all modern web browsers,
including Chrome, Firefox, Safari, and Edge, in their most recent and at least two
previous versions.
3. The system shall support the most commonly used document file formats for
uploading, such as PDF, DOCX, and PPTX, as configured by the SPSO.
4. The system shall be compatible with printers from multiple manufacturers and support
common printer models that can handle printing requests based on specified properties
like paper size, color, and duplex printing.

8
Software Requirements Specification for
A smart printing service student at HCMUT

2. Task 1: Requirement elicitation (1.3)


2.1 Use case Diagram for the Whole System

9
Software Requirements Specification for
A smart printing service student at HCMUT

2.2 Use case Diagram for Authentication

Name Sign Up

ID

Actor Student

Description A page for the student to sign up new account

Trigger Click on the button “Sign Up”

10
Software Requirements Specification for
A smart printing service student at HCMUT

Precondition Student does not have an account

Postcondition Student successfully created a valid account.

Main Flow 1. Student inputs in “ID” section

2. Student inputs in “Email” section

3. System checks in HCMUT_SSO database to make sure the given ID


and email is correct

4. System sends a 6-digits code to student’s email

5. Student enters the given code in the “Enter given code” sections

6. Student enters the password in the “Enter password” section

7. Student re-enters the password in the “Confirm password” section and


press “Confirm”

8. The student has successfully created an account, directed to “Log in”

Alternative Flow

Exception Flow At step 3, if the given ID and email do not map anything in the
HCMUT_SSO

3.1 Trigger an error log

3.2 Student return to step 1

At Step 4, if student does not receive the email

4.1 Press “Send code again” to receive another code

4.2 Re-enter the given code

At step 6, if the “confirm password” does not match the “password”

6.1 Trigger an error log

6.2 Re-enter password

11
Software Requirements Specification for
A smart printing service student at HCMUT

Name Log In

ID

Actor General User

Description A page for the user to log in

Trigger When user open the web/app

Precondition User that has an account

Postcondition Student successfully logged in the web/app.

Main Flow 1. Student inputs in “ID” section

2. Student inputs in “Email” section

3. Student inputs in “Password” section

4. Student inputs in “Captcha” section

5. Student presses “Log In”, then successfully enter the web/app

Alternative Flow No

Exception Flow At step 5, if the ID or Email or Password or Captcha is invalid

5.1 Trigger a respective error log

5.2 User return to step 1

12
Software Requirements Specification for
A smart printing service student at HCMUT

Name Log Out

ID

Actor General User

Description User gets out of web/app functional pages and gets back to log in page

Trigger Click on the button “Log Out”

Precondition Student has logged in the web/app

Postcondition Student has successfully logged out system will not provide any
functionality until re-logging in

Main Flow 1. Student press “Log Out” button

2. System triggers a pop up has a button “Confirm Log Out”, then logs
user out

3. User gets back to log in page

Alternative Flow No

Exception Flow At step 2, system gets an errror while logging out

2.1 System trigger an error log

2.2 System remains status and does not log user out

13
Software Requirements Specification for
A smart printing service student at HCMUT

2.3 Use case Diagram for Printer Management

Name Adding/Removing Printer

ID

Actor SPSO

14
Software Requirements Specification for
A smart printing service student at HCMUT

Description SPSO adds/removes printers to/from the system

Trigger Click on the button "Add Printer"

Precondition 1. Logged in as SPSO account successfully

2. SPSO click on the button "Manage Printer"

Postcondition Add/remove printers without errors

Main Flow 1. The system displays "Add/Remove Printer" page.

2. SPSO selects the desired printer(s) they want to add/remove.

3. SPSO clicks confirm to apply the changes.

4. The system confirms that the changes have been applied


successfully.

Alternative Flow At step 3: If "Cancel" is selected instead of selecting the changes.


3.1 The system returns to step 1 (the add/remove printer page).

Exception Flow At step 3: If the system encounters an error.


3.1. The system displays the reasons for the error.
3.2. The system prompts for a fix or adjustment to resolve issue.
3.3. The system returns to step 3 to attempt the change again.

Name Disabling/Enabling Printer

ID

15
Software Requirements Specification for
A smart printing service student at HCMUT

Actor SPSO

Description SPSO disables/enables printer(s) in the system

Trigger Click on the button "Add Printer"

Precondition 1. Logged in as SPSO account successfully


2. SPSO click on the button "Manage Printer"

Postcondition Printers disabled/enabled without errors

Main Flow 1. The system displays "Enable/Disable Printer" page.

2. SPSO selects the desired printer(s) they want to enable/disable.

3. SPSO clicks confirm to apply the changes.

4. The system confirms that the changes have been applied


successfull

Alternative Flow At step 3: If "Cancel" is selected instead of selecting the changes.


3.1 The system returns to step 1 (the enable/disable printer page).

Exception Flow At step 3: If the system encounters an error.


3.1. The system displays the reasons for the error.
3.2. The system prompts for a fix or adjustment to resolve issue.
3.3. The system returns to step 3 to attempt the change again..

16
Software Requirements Specification for
A smart printing service student at HCMUT

Name Viewing Printer's Info

ID

Actor SPSO

Description SPSO checks the printer's information

Trigger Click on the button "View Printer Info"

Precondition 1.Logged in as SPSO account successfully


2. SPSO click on the button "Manage Printer"

Postcondition Printer's information is viewed without errors

Main Flow 1. The system displays "Printer's Info" page.


2. SPSO selects the desired printer they want to view info.

3. SPSO selects "Exit" to exit view

Alternative Flow At step 2: If a printer encounters an error


2.1. Get fixing requirement from printer manufacturer

Exception Flow No

17
Software Requirements Specification for
A smart printing service student at HCMUT

2.4 Use case Diagram for Purchasing Paper

Name ID Buy paper

Actor Student

Secondary Actor SPSO

Description The Student enters the amount and size of additional pages to

18
Software Requirements Specification for
A smart printing service student at HCMUT

purchase.

Trigger The Student clicks on the button “Buy paper”.

Precondition User logs in as a Student successfully.

Postcondition The Student finishes entering the amount and size of additional
pages to purchase without errors.

Main Flow 1. The system displays the “Buy paper” page.

2. The Student chooses the page size to buy.

3. The Student chooses the amount of chosen page size to buy.

4. The Student clicks “Confirm” to confirm the chosen page size


and amount.

5. The system confirms that the page size and amount have been
chosen successfully and goes to the payment option.

Alternative Flow At step 4: If "Cancel" is selected instead of confirming the action.

4.1. The system returns to step 1 (the “Buy paper” page).

Name ID Payment

Primary Actor Student

Secondary Actor BK_Pay

Description The Student pays for additional pages.

19
Software Requirements Specification for
A smart printing service student at HCMUT

Trigger The Student clicks on the button “Confirm” in the “Buy paper”
page.

Precondition 1. User logs in as a Student successfully.

2. The Student clicks on the button “Buy paper”.

Postcondition The Student finishes purchasing additional papers without errors.

Main Flow 1. The system directs the Student to the BK pay page.

2. The Student logs into the BK pay page to complete the purchase

3. The system confirms the pages have been successfully paid for.

4. The system updates the Student’s account page balance.

Name ID View purchase history

Primary Actor Student, SPSO

Description The Student or SPSO views the Student’s purchase history.

Trigger The Student or SPSO clicks on the button “View purchase history”.

Precondition 1. User logs in as a Student successfully.

or 1.1. User logs in as SPSO successfully.

Postcondition The Student or SPSO finishes viewing the Student’s purchase


history without errors.

20
Software Requirements Specification for
A smart printing service student at HCMUT

Main Flow 1. The system displays the Student’s purchase history with purchase
date and amount.

2. The Student or SPSO can scroll through the purchase history to


view it.

3. The Student or SPSO clicks “Finish” after done viewing.

4. The system closes down the purchase history.

Alternative Flow At step 2: The Student or SPSO can search for a specific purchase
date instead of scrolling through the purchase history

2.1. The Student or SPSO enters a specific date to view.

2.2. The system displays the purchase history of the entered date.

Exception Flow At step 2.1: If the date entered is invalid:

2.1.1. The system displays: “Invalid date”

2.1.2. The system returns to step 2.1 for the user to enter again.

21
Software Requirements Specification for
A smart printing service student at HCMUT

2.5 Use case Diagram for Management Configuration

Name Manage configuration

ID

Actor SPSO

22
Software Requirements Specification for
A smart printing service student at HCMUT

Description SPSO manage the configuration of the system

Trigger Click on the button “Change Configuration”

Precondition Log in as SPSO account successfully

Postcondition Change the configuration without error

Main Flow 1. The system displays “the Configuration Change” page.

2. SPSO selects the configuration they want to change.

3. SPSO clicks confirm to apply the changes.

4. The system confirms that the changes have been applied


successfully.

Alternative Flow At step 3: If "Cancel" is selected instead of confirming the change.

3.1. The system returns to step 1 (the configuration change page).

Exception Flow At step 4: If the system encounters an error.

4.1. The system displays the reason for the error.

4.2. The system prompts for a fix or adjustment to resolve the issue.

4.3. The system returns to step 3 for the SPSO to attempt the change
again.

23
Software Requirements Specification for
A smart printing service student at HCMUT

Name Permit file types

ID

Actor SPSO

Description SPSO permit the types of files that students can upload for printing in
the system

Trigger Click on the button “Permit file types”

Precondition 1. Log in as SPSO account successfully

2. SPSO click on the button “Change Configuration”

Postcondition Permit file types without error

Main Flow 1. The system displays “the file type permission” page.

2. SPSO selects the file type they accept.

3. SPSO clicks confirm to apply the changes.

4. The system confirms that the changes have been applied


successfully.

Alternative Flow At step 2: If the SPSO wants to change the memory limit for those
files:

2.1. The SPSO types in the maximum memory size they accept for file
uploads.

At step 3: If the SPSO selects "Cancel" instead of confirming the

24
Software Requirements Specification for
A smart printing service student at HCMUT

change:

3.1. The system returns to step 1 (file type permission page).

Exception Flow At step 4: If the memory limit for the file type exceeds 1GB:

4.1. The system displays an error: "The memory exceeds the limit."

4.2. The system prompts the SPSO to input a valid memory size.

4.3. The system returns to step 2.1 for the SPSO to correct the memory
size.

Name Number of default pages

ID

Actor SPSO

Description SPSO permit the number of default that student can receive per month

Trigger Click on the button “Change default page”

Precondition 1. Log in as SPSO account successfully

2. SPSO click on the button “Change Configuration”

Postcondition Change default pages without error

25
Software Requirements Specification for
A smart printing service student at HCMUT

Main Flow 1. The system displays “Change default pages” page.

2. SPSO selects the number of default pages they accept.

3. SPSO clicks confirm to apply the changes.

4. The system confirms that the changes have been applied


successfully.

Alternative Flow At step 3: If the SPSO selects "Cancel" instead of confirming the
change:

3.1. The system returns to step 1 (“Change default pages” page).

Exception Flow No

Name Change date for saving history

ID

Actor SPSO

Description SPSO change date for saving history

Trigger Click on the button “Change saving date”

Precondition 1. Log in as SPSO account successfully

2. SPSO click on the button “Change Configuration”

26
Software Requirements Specification for
A smart printing service student at HCMUT

Postcondition Change saving date

Main Flow 1. The system displays “chang saving date” page.

2. SPSO selects the month.

3. SPSO clicks confirm to apply the changes.

4. The system confirms that the changes have been applied


successfully.

Alternative Flow At step 3: If the SPSO selects "Cancel" instead of confirming the
change:

3.1. The system returns to step 1 (“chang saving date” page).

Exception Flow At step 4: If choosing month exceed 12:

4.1. The system displays an error: "The month is invalid."

4.3. The system returns to step 2.1 for the SPSO to choose again.

Name Date for giving number of pages

ID

Actor SPSO

Description SPSO change date for giving number of pages

27
Software Requirements Specification for
A smart printing service student at HCMUT

Trigger Click on the button “Change giving date”

Precondition 1. Log in as SPSO account successfully

2. SPSO click on the button “Change Configuration”

Postcondition Change saving date successfully if the last changing is exceeding 12


months.

Main Flow 1. The system displays “chang giving date” page.

2. SPSO selects the month.

3. SPSO selects the appropriate with that month.

4. SPSO clicks confirm to apply the changes.

5. The system confirms that the changes have been applied


successfully.

Alternative Flow At step 3: If the SPSO selects "Cancel" instead of confirming the
change:

3.1. The system returns to step 1 (“chang giving date” page.).

Exception Flow At step 4: If the last change was made less than 12 months ago:

4.1. The system displays an error: "You cannot change the date within
12 months of the last change."

4.2. The system prompts the SPSO to wait until 12 months have passed
since the last change.

28
Software Requirements Specification for
A smart printing service student at HCMUT

2.6 Use case Diagram for System Report

Name ID Report

Actor SPSO

Description SPSO manages the report of the printing system.

Trigger SPSO clicks on the button “Report”.

Precondition User logs in as SPSO successfully.

29
Software Requirements Specification for
A smart printing service student at HCMUT

Postcondition SPSO finishes managing the report without errors.

Main Flow 1. The system displays the “Report management” page.

2. SPSO choose the action they want to perform (period to view or


export report file)

3. SPSO clicks “Done” after finishing managing the report.

4. The system closes down the “Report management” page.

Alternative Flow No

Exception Flow No

Name ID Choose period

Actor SPSO

Description SPSO chooses the report period of the printing system to view.

Trigger SPSO clicks on the button “Choose period”.

Precondition 1. User logs in as SPSO successfully.

2. SPSO clicks on the button “Report”.

Postcondition SPSO finishes viewing the report period without errors.

Main Flow 1. SPSO enters the month and year period of the report to view.

2. The system displays the report of the chosen month and year.

30
Software Requirements Specification for
A smart printing service student at HCMUT

3. SPSO clicks “Done” after finishing viewing.

4. The system closes down the report.

Alternative Flow

Exception Flow At step 1: If the chosen month and year is invalid or after the
previous month:

1.1 The system displays: “Invalid time period” or “The time period
cannot be after the previous month”.

1.2 The system returns to step 1 for SPSO to enter again.

Name ID Export file

Actor SPSO

Description SPSO chooses the file type to export the report.

Trigger SPSO clicks on the button “Export”.

Precondition 1. User logs in as SPSO successfully.

2. SPSO clicks on the button “Report”.

Postcondition The report file is exported in the chosen file type for the SPSO.

Main Flow 1. SPSO chooses the desired file type for the report.

2. SPSO clicks “Confirm” to export the report in the chosen file


type.

31
Software Requirements Specification for
A smart printing service student at HCMUT

3. The system confirms the file type to export.

4. The system exports the report in the chosen file type for SPSO.

Alternative Flow No

Exception Flow No

32
Software Requirements Specification for
A smart printing service student at HCMUT

2.7 Use case Diagram for Management Account

Name ID Manage account

Actor University Administrators

Description University Administrators manage the accounts of all students.

Trigger University Administrators click on the button “Manage accounts”.

Precondition Users log in as University Admins successfully.

33
Software Requirements Specification for
A smart printing service student at HCMUT

Postcondition University Administrators finish managing student accounts without


errors.

Main Flow 1. The system displays the “Account Management” page.

2. University Admins choose the action they want to perform (create,


delete or suspend an account).

3. University Admins click “Confirm” to carry out the action.

4. The system confirms that the action has been carried out successfully.

Alternative Flow At step 3: If "Cancel" is selected instead of confirming the action.

3.1. The system returns to step 1 (the “Account Management” page).

Exception Flow At step 4: If the system encounters an error.

4.1. The system displays the reason for the error.

4.2. The system returns to step 3 for the University Admins to attempt
the action again.

Name ID Create student account

Actor University Administrators

Description University Administrators create a student account.

Trigger University Administrators click on the button “Create student account”.

Precondition 1. Users log in as University Admins successfully.

2. University Admins click on the button “Manage accounts”.

34
Software Requirements Specification for
A smart printing service student at HCMUT

Postcondition University Administrators finish creating a student account without


errors.

Main Flow 1. The system displays the “Account Creation” page.

2. University Admins fill in the necessary information to create an


account (Username, password).

3. University Admins click “Confirm” to carry out the action.

4. The system confirms that the action has been carried out successfully.

Alternative Flow At step 3: If "Cancel" is selected instead of confirming the action.

3.1. The system returns to step 1 (the “Account Creation” page).

Exception Flow At step 4: If the username and password contains invalid characters:

4.1. The system displays: “Invalid characters used in username or


password”

4.3. The system returns to step 1 for the University Admins to attempt
the action again.

Name ID Delete student account

Actor University Administrators

Description University Administrators delete a student account.

Trigger University Administrators click on the button “Delete student account”.

Precondition 1. Users log in as University Admins successfully.

35
Software Requirements Specification for
A smart printing service student at HCMUT

2. University Admins click on the button “Manage accounts”.

Postcondition University Administrators finish deleting a student account without errors.

Main Flow 1. The system displays the “Account Deletion” page.

2. University Admins choose a student account to delete

3. University Admins click “Confirm” to carry out the action.

4. University Admins click “Yes” when the system displays “Are you sure
you want to delete this account?”

5. The system confirms that the action has been carried out successfully.

Alternative Flow At step 3: If "Cancel" is selected instead of confirming the action.

3.1. The system returns to step 1 (the “Account Deletion” page).

At step 4: If "No" is selected instead of “Yes”..

4.1. The system returns to step 1 (the “Account Deletion” page).

Exception Flow No

Name ID Suspend student account

Actor University Administrators

Description University Administrators suspend a student account.

Trigger University Administrators Click on the button “Suspend student


account”.

36
Software Requirements Specification for
A smart printing service student at HCMUT

Precondition 1. Users log in as University Admins successfully.

2. University Admins click on the button “Manage accounts”.

Postcondition University Administrators finish suspending a student account without


errors.

Main Flow 1. The system displays the “Account suspension” page.

2. University Admins choose a student account to suspend

3. University Admins enter the reason for suspension

4. University Admins click “Confirm” to carry out the action.

5. The system confirms that the action has been carried out successfully.

Alternative Flow At step 4: If "Cancel" is selected instead of confirming the action.

4.1. The system returns to step 1 (the “Account Deletion” page).

Exception Flow No

37
Software Requirements Specification for
A smart printing service student at HCMUT

2.8 Use case Diagram for Printing Service

38
Software Requirements Specification for
A smart printing service student at HCMUT

Name Print

ID

Actor Student

Description Student prints document

Trigger Click on the button “Print file”

Precondition 1. Log in as Student account successfully

2. Upload file

3. Have enough page for printing

4. Choose their configuration (choose printer, …)

Postcondition Print file successfully

Main Flow 1. Student clicks on the button “Print file”.

2. The system displays “Printing…”.

3. The system confirm “Print successfully”.

Alternative Flow At step 1: If student choose “View Printing Status”

1a.1. The system display “Printing Status”.

1a.2. Return the “Printing” page.

39
Software Requirements Specification for
A smart printing service student at HCMUT

Exception Flow At step 1: If the printer have any problems:

1b.1. The system display “Failure”.

1b.2. Return to “Printing page”

1b.3. Send inform to SPSO.

Name Upload file

ID

Actor Student

Description Student uploads file for printing

Trigger Click on the button “Printing”

Precondition 1. Log in as Student account successfully

2. Display “Printing” page

Postcondition Upload file for printing successfully

Main Flow 1. Student uploads file

2. Student clicks “Print”.

Alternative Flow No

40
Software Requirements Specification for
A smart printing service student at HCMUT

Exception Flow At step 2: If the file is not permitted.

4.1. The system displays the permitted file.

4.2. Return step 1.

Name View printing review

ID

Actor Student

Description Student see printing review

Trigger Click on the button “Printing”

Precondition 1. Log in as Student account successfully

2. Display “Printing” page

Postcondition Student can see printing review

Main Flow 1. Student clicks “Print”.

2. The system display printing review.

3. Student confirms.

4. Start printing.

41
Software Requirements Specification for
A smart printing service student at HCMUT

Alternative Flow At step 3: If Student does not confirm

3.1. Return “Printing” page

Exception Flow No

Name Change print configuration

ID

Actor Student

Description Student can change the configuration for printing

Trigger Click on the button “Printing”

Precondition 1. Log in as Student account successfully

2. Display “Printing” page

Postcondition Print document by user’s configuration

Main Flow 1. The system display configuration(area,…)

2. Student confirms.

3. Student clicks “Print”.

42
Software Requirements Specification for
A smart printing service student at HCMUT

Alternative Flow At step 2: If student clicks “cancel”

2.1. Return “Printing” page

Exception Flow At step 2: If the printer in that area is not ready(out of paper,…)

2.1. Return step 1.

Name Viewing History


ID

Actor SPSO

Description Check the printer(s)’ printing history by SPSO

Trigger SPSO click on the button “View History” to see the information on the
system.

Precondition 1. User has successfully logged in to the system

2. User selects “View History”.

Postcondition The printing history is viewed successfully

Main Flow 1. The system displays “the Printing History” page.

2. The system display and SPSO user can view the printing history and
filters the information:

• Select user: Choosing which user name of student to view


• Select printer: Select the printer to view
• Select start date: Select the start date of historical statistics. If the
user do not select the start date, all previous time will be retrieved.

43
Software Requirements Specification for
A smart printing service student at HCMUT

• Select end date: Select the end date of historical statistics.


• If you do not select the end date, the current time will be retrieved.

Alternative At step 2, SPSO wants to filter orders based on user name, printer,
Flow processing time

2.1. SPSO proceeds to select the desired attributes

2.2. The system displays orders based on the selected information

Exception Flow At step 1, the system failed to retrieve data

1.1. The system displays an error message to SPSO

At step 2, there is no print order in the system

2.1. The system displays a message that there is no print order

Name Viewing User’s Personal Printing History


ID

Actor Student

Description User check personal printing history

Trigger Click on the button “View History” to see the information.

Precondition 1. User has successfully logged in to the system

2. User selects “View History”

Postcondition The printing history is viewed successfully

44
Software Requirements Specification for
A smart printing service student at HCMUT

Main Flow 1. The system retrieves printing info

2. The system shows a interface to user and sort out information such as:

• Select printer: choose the desired printer


• Select start date: choose the desired starting date of the printing record.
If none is selected, it will retrieve all the previous records.
• Select end date: choose the desired date that the printing record ends. If
none is selected, it will retrieve all the records up to the current date
starting from the starting date.

Alternative At step 2, if user want to sort records based on printers, time executed
Flow 2.1. User selects desired attributes

2.2. The system shows information based on the selected attributes.

Exception Flow At step 1, the system fails to retrieve data

1.1 The system notifies the error for the user

At step 2, there are no records in the system

2.1. The systems notifies that there are no records.

45
Software Requirements Specification for
A smart printing service student at HCMUT

3. Task 2: System modelling


3.1 Actvity Diagram
3.1.1 Change configuration for SPSO

Link Draw.io of the diagram: here

46
Software Requirements Specification for
A smart printing service student at HCMUT

3.1.2 Display Uploading Files Page

Link Draw.io of the diagram: here

After successful log in, to print documents, users need to click on "In Tài Liệu"
displayed on the main page screen. The system then proceeds to display the upload documents
page.

47
Software Requirements Specification for
A smart printing service student at HCMUT

3.1.3 Uploading File for Student

Link Draw.io of the diagram: here

Students upload the files into the system. With each file is uploaded, the System will
check the file type and return result. With the file has “Hoàn tất”, that file is acceptable. With
another result as “Lỗi kích thước”, “Lỗi định dạng” will be blur. Students can choose one and
just one file which has “Hoàn tất” to print.

48
Software Requirements Specification for
A smart printing service student at HCMUT

3.1.4 Printing Configuration for Student

Link Draw.io of the diagram: here

Clicking “Next” will display the “Configuration Page” for the student who can then
choose the page sequence to print, choose the size for the pages, modify the ratio, choose the
side per page, choose side of document per side-page and choose page direction. After that the
printing preview will be displayed.

49
Software Requirements Specification for
A smart printing service student at HCMUT

3.1.5 Printing Service for Students

Link Draw.io of the diagram: here

Clicking “Next” will display the satisfied printers that can be used and the student will
be able to choose one of those printers to print their uploaded file. If the file is printed
successfully the “Successful” page will be displayed and the printing will be stored into the
database. Otherwise, if the printer fail to print the “Fail” page will be displayed.

50
Software Requirements Specification for
A smart printing service student at HCMUT

3.2 Sequence Diagram


3.2.1 Change configuration for SPSO

Link Draw.io of the diagram: here

51
Software Requirements Specification for
A smart printing service student at HCMUT

After the student has clicked “Open change configuration page”, the PrintConfigView
will display the “Configuration page”. The student will then be able to carry out the following
actions in parallel with each other: Select “Save date for giving pagenum” - the
PrintConfigView will display giving page date, Select “Save date for history saving” - the
PrintConfigView then will display history saving date, Select “Set number of pages” - the
PrintConfigView will display number of pages, click the checkbox multiple select file types to
add will display the chosen file types allowed for students.Then if the student clicks “Trở về”,
it will return to the previous page, else if student clicks “Tiếp theo”, it will do some parallel
following actions: the PrintConfigView calls the Change_date_giving_numpage() from
PrintConfigController which will then call Save_date_for_giving_pagenum() function from
PrintConfigModel which will return to PrintConfigController then return to PrintConfigView;
the PrintConfigView calls the Save_date_for_giving_numpage() from PrintConfigController
which will then call Save_date() function from PrintConfigModel which will call the
Set_Save_History_Date() from Database and return respectively to the PrintConfigModel,
PrintConfigController, PrintConfigView; the PrintConfigView calls the
Update_default_page() from PrintConfigController which then calls the Set_Page_Number()
function from PrintConfigModel and return respectively to the PrintConfigController,
PrintConfigView; the PrintConfigView calls the Permit_file() function from the
PrintConfigController which then calls the Change_file_type() function from
PrintConfigModel, then return to the PrintConfigController and return to PrintConfigView.
After all those parallel actions, a pop up with an announce “Lưu thay đổi thành công” will
appears together with a button “Thoát”. When the student clicks “Thoát” then returns.

52
Software Requirements Specification for
A smart printing service student at HCMUT

3.2.2 Display Uploading Files Page

Link Draw.io of the diagram: here

After student clicks on "In Tài Liệu" displayed on the main page screen. The
PrintServiceView activates the function Show_printing_document_page() and display the
upload documents page to User Interface.

53
Software Requirements Specification for
A smart printing service student at HCMUT

3.2.3 Sequence Diagrams for Uploading Files

Link Draw.io of the diagram: here

The user can upload multiple files at once. Each time a file is uploaded,
PrintServiceView will call the Check_file() function from PrintServiceController().
PrintServiceController calls File_type() from Document to obtain the type of file.
PrintServiceController then uses this type to call the Check_permit_file() function from
PrintConfigurationModel(). If the result returned is valid, PrintServiceView() will display the
screen as “Hoàn tất” indicating that the file upload is complete. Otherwise, it will display
either “Lỗi định dạng” or “Lỗi kích thước” Files without errors will be added to List_file,
while files with errors will be blurred. The user will select one of the error-free files to
proceed to the next step.

54
Software Requirements Specification for
A smart printing service student at HCMUT

3.2.4 Sequence Diagram for Printing Service

Link Draw.io of the diagram: here

After the student has clicked “Next”, PrintServiceView will call the Add_file()
function from PrintServiceController which will then call Get_doc() from PrintConfiguration
for the PrintServiceView to display the “Configuration page”. The student will then be able to
carry out the following actions in parallel with each other: Choose page sequence to print
55
Software Requirements Specification for
A smart printing service student at HCMUT

(Update_printing_page()); choose page size A3 or A4 (Update_size page()); choose ratio for


printed pages (Update ratio()), choose side per page (Update_side_page()); choose side of
document per side-page (Update_side_sidepage()); and choose page direction
(Update_direction_page()). PrintServiceView will subsequently display the chosen printing
configuration for each action after they are carried out and finally display the printing
preview.

56
Software Requirements Specification for
A smart printing service student at HCMUT

3.2.5 Sequence Diagram for Printing Configuration for Students

57
Software Requirements Specification for
A smart printing service student at HCMUT

Link Draw.io of the diagram: here

If the student clicks “Return” then PrintServiceView will display the “Upload page”.
Otherwise, if the student clicks “Next” PrintServiceView will call Update_config() from
PrintServiceController which will then change the configuration to the chosen one by calling
Change_config from PrintConfiguration. PrintServiceView will then carry out 3 parallel: Get
the file name by calling the Get_file_name() function from PrintServiceController which will
get the file name from PrintConfiguration by calling its Get_file_name() function; get the
remaining paper left in the student’s account by calling Get_student_page() from
PrintServiceController which will call Get_remainpaper() in Student to return amount of
student’s remain paper; get the number of needed papers to print by calling function
Get_need_page() in PrintServiceController which will call Create_by_config() in
PrintConfiguration and it will return the needed number by calling its own Get_page()
function.

PrintServiceView will check for each available printer by calling the function
Check_printer() from PrintServiceController which will then call Get_Paper() from Printer to
get the number of papers left in each printer. If the number is enough to print the printer will
be added to List_printer.

PrintServiceView will then check the page balance of the student by calling
Check_page_balance() from PrintServiceController. If it’s not enough then PrintServiceView
will display the “Confirm page” with the “Next” button blurred out which means it cannot be
clicked. Otherwise, PrintServiceView will display the “Confirm page” normally.
The student can then view the list of satisfied printers in a dropdown list by calling the
Show_list_printer() function from PrintServiceView which will then get the List_printer from
PrintServiceController its List_printers() function. The student will then choose a printer to
use from this list by calling the function Choose_printer() from PrintServiceView which will
get the number of the chosen printer (No_Printer) from PrintServiceController after calling its
Choose_printer() function. The student can then see PrintServiceView displaying the chosen
printer.

Finally the student gets the option to click “Return” which PrintServiceController will
then take them back to the “Configuration” page. Otherwise, the student can click “Next” to
start printing. PrintServiceView will call the Start_print function from PrintServiceController
which will call another Start_print function from Printer. If the printer successfully prints the
58
Software Requirements Specification for
A smart printing service student at HCMUT

file PrintServiceController will save the printing history into Database by calling its function
Save_Printing_History() and PrintServiceView will display the “Success” page. Otherwise,
PrintServiceView will display the “Fail” page.

59
Software Requirements Specification for
A smart printing service student at HCMUT

3.3 Class Diagram

Link Draw.io of the diagram: here

60
Software Requirements Specification for
A smart printing service student at HCMUT

3.3.1 PrintServiceView()

Displays the printing interface, supports entering printing parameters, selecting a


printer, and confirming printing.

Attribute
• List_file : the list of the file that student upload and want to print

Method

• Upload_file(Document): upload the file want to print on the website


• Choose_file(Document): choosing what type of file want to print (doc,pdf,...)
• Show_printing_document_page(): display the pages that have the information of
printing service for students
• Update_size_page(): student enters the size of page
• Update_direction_page(): choose the direction of page (left, right, upside-
down,...)
• Update_side_sidepage(): choose how many page for 2-side page printing
• Update_side_page(): choose how many page for 1-side page printing
• Update_ratio(): choose the ratio of page want to print
• Show_file_document: display the file document on the screen with information
• Update_printing_page(): update the default of printing page
• Choose_printer(): choose printer want to print
• Print_confirm(): confirm to print after enter all the necessary information
• Show_printer_preview(): show the information of the printer
• Show_Config(): show the configuration of the printer for student to choose and
modify
• Update_print_config(): update the printing page configuration after edit the
information of printing page
• Print_Service(): print the page by request
• Input_page(): input the pages that have to print
• Show_need_page(): show the page that need more to print
• Show_student_page(): show the default page of student has
• Show_list_printer(): show the list of printer working or not

61
Software Requirements Specification for
A smart printing service student at HCMUT

3.3.2 PrintServiceController()

Function of entering printing parameters into the system, counting the number of
papers, and selecting printers suitable for printing needs

Attribute
• List_printer : the list of the printer
• NO_printer: number of the printer in service
• Doc: document that student upload
Method
• Add_file(): add the file on the website
• Minus_Page(): delete the page printing
• Calculate_page_number(): calculate the page that student want to print
• Update_student_page() : update the student page printing
• Check_page_balance(): check the present page that student has to print
• Get_file_name(): get the name of the file printing
• Update_config(): update the printing configuration
• Get_student_ID() : get the student ID
• Start_print() : start to print the document
• Check_file() : check the type, format of the file
• Check_printer(printer): check the available printer to print
• Create_print_file(PrintConfiguration): create to print after edit the print
configuration
• Get_student_page(): get the student page available
• Get_need_page(): get the page that student need more to print
• List_printers(): list the number and available printer
• Choose_printer(): choose the printer to print the document

3.3.3 Student()

User who uses the printing service

Attribute
• Student_ID: the ID of the student to log in to the website
• Remain_page: Page that student has to print the document

62
Software Requirements Specification for
A smart printing service student at HCMUT

Method
• Get_ID(): get the ID of the student
• Get_remainpaper(): get the remaining page that the student has

3.3.4 Printer()

Print the document on demand

Method
• Get_Paper(): get the paper to print the document
• Start_print(): start to print the document when receive the request.

3.3.5 Printer 1, 2, 3, 4, 5() - inheritance from the Printer

Get the paper and send to the Printer to start print

Attribute
• PaperA4: page A4 in document that need to print more
Method
• Get_paper(): get the A4 paper then send to Printer to print

3.3.6 Document()

Student uploads the document to print

Attribute
• A3Page: page A3 in document that need to print
• Pages
• Content
• Type: type of the document (word, PDF,...)
• Name: the title of the document
• Document_ID: the ID of the document
• Ratio: ratio, size of the document

Method

• File_name(): get the file name of the document to print


• File_type(): get the type of the document

3.3.7 PrintConfiguration()
63
Software Requirements Specification for
A smart printing service student at HCMUT

Print configuration function for student to edit and enter information to print the
document

Attribute
• PrintDoc (Document): document to print
• Page_range (int[]): the range of the document
• Page_size (int): size of the paper
• Page_orientation (int): orientation of paper (portrait, landscape,…)
• Page_scale (int): scale of the paper
• Page_per_sheet (int): 1 page per sheet, 2 page per sheet ….
• Page_side (int): print 1 page 1 side or 1 page 2 side
Method
• Set_page_range(int[]): set the range of the paper to print
• Set_page_size(): set the size of the paper to print
• Set_page_orientation(): set the orientation of paper to print
• Set_page_per_sheet(): set the paper per sheet (1 paper per sheet, 3 paper per
sheet,…)
• Set_ratio(): set the ratio for paper
• Get_page(): get the page that the student has to print
• Get_file_name(): get the file name of the document student want to print
• Change_config(document): change the printing configuration by edit the
information
• Create_by_config(): create parameters for print configuration
• Get_doc(): get the document to print

3.3.8 PrintConfigurationView()

Display the interface for printing configuration settings

Method:
• Display_Configuration(config_data): Displays the given configuration data for
printing settings.
• Change_file_type(): Changes the permit file type for printing.
• Get_date_for_giving_pagenum(): Modify the date for giving page numbers.
• Get_date_for_saving_history(): Get the date for the printing history stored.
64
Software Requirements Specification for
A smart printing service student at HCMUT

• Change_date_history(): Modify the date for the printing history stored.


• Change_page(): Changes the number of giving pages

3.3.9 PrintingConfigurationModel()

Manage and validate printing permissions, page settings, and historical records

Attribute:
• file_permit (array[string]): Stores a list of permitted file types
Method:
• Update_Permit_File(file: PermitFile): Updates the list of permitted file types by
adding or modifying a specific permit file type.
• Set_Page_Number(number: Int): Changes the number of giving pages
• Set_Save_History_Date(date: Date): Modify the date for the printing history
stored.
• Save_date(): Modify the date for the printing history stored.
• Check_permit_file(): Checks if a file is permitted based on the list of allowed file
types, returning boolean

3.3.10 PrintingConfigurationController()

Manage and control the settings and permissions related to printer configuration,

Method:
• Save_date_for_giving_pagenum(): Changes the number of giving pages
• Save_date_for_saving_history():Modify the date for the printing history stored.
• Permit_file(): Updates the list of permitted file types
• Update_default_page(): Changes the number of giving pages

3.3.11 SPSO()

User who manages the configuration

Attribute:
• SPSO_ID: determine user

3.3.12 Database()

Responsible for directly accessing and retrieving data from the database

65
Software Requirements Specification for
A smart printing service student at HCMUT

Attribute
• PrintHistory: history of printing information
• Student
Method
• Check_Pritner_HaveEnough_Paper() : check if the printer has enough of paper to
print or not
• Get_Student_History(studentID, timestamp): get the student printing information
from timestamp
• Get_Printer_History(printerID, timestamp): get the printer printing information
from timestamp
• Save_Printing_History() : save the printing history information
• Set_Save_History_Date() : set the timestamp that use the printing service
• Set_Page_Number(number: Int): set the number of pages that have to print

66
Software Requirements Specification for
A smart printing service student at HCMUT

3.4 User Interfaces using Figma

Link Figma: here

3.4.1 Main screen

This is the first look of the web page which includes 3 sections: the header which then
serves as a navigation bar - has 2 buttons “Log in” and “Sign Up”, the body section is
HCMUT background, the footer contains the address together with contact information of
HCMUT.

67
Software Requirements Specification for
A smart printing service student at HCMUT

3.4.2 Pre-login screen

Before using system functionality, the user must login. Click on “Log in” button will
then open a sidebar contain 2 button “SPSO” and “Student” based on the user job and demain.

3.4.3 Login page

If the user is a student, click on the “Student” button, the sidebar will have new
content. The student enters “Username” and “Password” and press Login to check validation
68
Software Requirements Specification for
A smart printing service student at HCMUT

of the account. If correct, then directs the student to the next page else an announcement will
occur to inform wrong account information. The “Sign up” button serves the same as the one
in the navigation bar, which will then redirect users to the sign-up area.

3.4.4 Main menu for the student

When the account is correct, the web will go to the main page for student purposes.
The navigation bar will now fill with new link: “Trang chủ”, “In tài liệu”, “Lịch sử in”, “Mua
trang in”, ‘Hỗ trợ”, a bell icon represents notifications, an avatar icon is link to user’s
information.

69
Software Requirements Specification for
A smart printing service student at HCMUT

3.4.5 Print document page

Click the “In tài liệu” will direct the student to the page for pushing the document that
student wants to print. Here, students have 2 options, drag and drop file or choosing file from
a local database such as computer, smartphone, Warning! the file type has already been
mentioned, if it does not meet the file type or exceeds 50MB, the file will be served as an
error and can’t be printed.

70
Software Requirements Specification for
A smart printing service student at HCMUT

3.4.6 Uploading file page

If the file meets all the requirements, it will be uploaded to the server for the following
actions.

3.4.7 Uploaded file page

Here is an example of a file uploaded successfully.

71
Software Requirements Specification for
A smart printing service student at HCMUT

3.4.8 Confirm file to go to the configuration

Then the flow will automatically move to the next action, which is to confirm the file
that was uploaded. Click the button “Trở về” will redirect user to the previous interface. Click
the button “Tiếp theo” to move to the next step of flow.

3.4.9 Configuration file format page

72
Software Requirements Specification for
A smart printing service student at HCMUT

The left side is displaying the uploaded file, the right side is configuration for it. The
student has 6 fields to complete, “Chọn trang cần in” will let user choose pages to print
(default is print all pages), “Khổ giấy” will let user choose page size: A3 or A4, “Hướng in”
will let user choose page’s direction: top or bottom, “Số trang/1 mặt in” will let you enter
prefer number of slide in 1 pages, “Số mặt in/1 tờ” will let user choose between 1 and 2. The
same with previous frame, it has 2 buttons to direct user “Trở về” and “Tiếp theo”.

3.4.10 Invoice page

After that, the server will create a kind of invoice that displays some crucial
information: File name, Number of page available, Number of pages needed to print, Printer -
can choose from a couple of available printers. Button “Trở về” to return, button “Tiếp theo”
to forward.

73
Software Requirements Specification for
A smart printing service student at HCMUT

3.4.11 Popup successfully print page

A pop up appears to announce a user that has printed successfully. Click “Thoát” to
get out of the flow.

3.4.12 System configuration page

When user navigate through the “Cài đặt hệ thống” in the navigate bar, there will be
the user interface (UI) for SPSO to config the default set up of the system.

74
Software Requirements Specification for
A smart printing service student at HCMUT

3.4.13 System config in use

Here, user can select date for box “Ngày cung cấp giấy” and box “Ngày lưu lịch sử”
using a date picker with the appearance of a small calendar, user can choose date, month, year
and the output will be displayed with this format “DD/MM/YYYY”. With the box “Số trang
giấy được cung cấp mỗi học kỳ”, user will be able to input an integer number as needed. The
box “Định dạng file cho phép” is a multiple-choice checkbox, it will display supported only
file types for users to tick. After ticking the box, from a blank square it will turn into a
checkbox with a blue background surrounding a white check sign. At the bottom of the frame,
there will be 2 buttons which is “Trở về” and “Tiếp theo” for navigating purpose. Button “Trở
về” will return user back to the previous page.

75
Software Requirements Specification for
A smart printing service student at HCMUT

3.4.14 Popup successfully save page

When user clicks Button “Tiếp theo” there will be a pop up to inform user that has
changed successfully with a text box “Lưu thay đổi thành công”, and a button named “Thoát”
to get user out of the flow.

76
Software Requirements Specification for
A smart printing service student at HCMUT

4. Task 3: Architecture design


4.1 Layered Architecture:

Link Draw.io of the diagram: here

The system is mainly used by two types of users: Students and SPSO. Therefore, the
user interface is also divided into Students' interface and SPSO's interface.

77
Software Requirements Specification for
A smart printing service student at HCMUT

The student's interface has main functions such as Login, Print, Purchase, View
History. The logging function will access the HCMUT_SSO service for user authentication.
The printing document function accesses the printing service and interacts with student data
through the Persistence layer. The viewing printing history function accesses the history
service, it reads data about printing orders and documents from the database. The purchasing
printed page’s function will access the BKPay payment service and record the transaction
results into the purchase order database.

The SPSO interface has main functions such as Login, viewing printing history of
customers, viewing periodic reports, managing printers and editing system configuration.
Some functions operate similarly to those of the students. In addition, there are the following
functions: The periodic report viewing function accesses the report creation service, thereby
reading data from related databases. The printer management function accesses the printer
management service to read printer information, printer list from the printer database, and
update, add, delete, printer information, enable and disable printers. The system configuration
function accesses and edits configuration files from the system.

4.2 Present User Interface:

Our team choose React for some reason:

• Reusable Components: Create parts of UI (like buttons, print status indicators,


and settings) once and reuse them throughout the app, saving time and ensuring
everything looks consistent.
• Smooth Experience: React makes the app more responsive, so users will have a
smoother experience when interacting with things like print jobs or settings.
• Scalability: As develope app and add more features, React's structure makes it
easy to scale without making the code messy.
• Easy Integration: React can easily work with backend services and third-party
tools, add new features quickly.

4.3 API management:

• API for Authentication: Uses HCMUT_SSO (HCMUT Single Sign-On) for user
authentication, ensuring only authorized users can access the system.

78
Software Requirements Specification for
A smart printing service student at HCMUT

• API for Document Pre-processing: When a user uploads a file, this API checks if the
file format is acceptable (e.g., PDF, DOCX). It ensures compatibility with the printing
system.
• API for Document Formatting: After successful upload, this API creates a file in a
default format. If the user modifies the format, this API updates the document
accordingly to provide a preview before printing.
• API for System Management: Allows the SPSO (Smart Printing Service Operator)
to manage and modify the system settings as needed.
• API for Payment: Facilitates transactions through BKPay, allowing users to make
payments for printing services or purchase additional print pages.
• API for Printing History and Reports: Generates reports periodically and enables
admins and users to view print history, allowing for easy monitoring and tracking of
print activities.

4.4 Store Data:

Link Draw.io of the diagram: here

We chose MySQL for the Smart Printing Service database because it’s a reliable,
scalable, and secure relational database system, ideal for handling large datasets and enforcing
relationships between entities like students, printers, and documents.

79
Software Requirements Specification for
A smart printing service student at HCMUT

4.4.1 SPSO:

Attributes:

• SPSO_ID: A unique ID for each operator managing the printers.

Relationships:

• Manages: The SPSO oversees each printer, ensuring it’s stocked and working.
• Disables: The SPSO can turn off a printer if it needs maintenance or isn’t
available.

4.4.2 Student:

Attributes:

• StudentID: A unique ID for each student.


• Name: The student’s full name.
• Remain_page: Number of Pages the student has left to print.

Relationships:

• Creates: The student buy paper, called a Paper_Transaction.


• Prints: The student can send a Document to the printer to be printed.

4.4.3 Printer:

Attributes:

• No.: A unique ID for each printer.


• Location: Where the printer is located.
• PaperA4: The amount of A4 paper currently in the printer.

Relationships:

• Disabled by SPSO: The SPSO can disable the printer when needed.
• Prints: This printer is used to print documents sent by students.

4.4.4 Document:

Attributes:

• Document_ID: A unique ID for each document printed.


• Name: The title of the document.
• Pages: The number of pages in the document.
• Type: The file type, like .pdf or .docx.
• A3Page: Shows if the document includes any A3-sized pages.
• Ratio: Indicates the print size, such as fit to page or scale.
80
Software Requirements Specification for
A smart printing service student at HCMUT

Relationships:

• Printed by Student: The student who requested to print this document.


• Printed on Printer: The printer that was used for printing this document.

4.4.5 Paper_Transaction:

Attributes:

• ID: A unique ID for each buying paper transaction.


• Number: The amount of buying paper.
• Time: When the transaction making.

Relationships:

• Created by Student: Each transaction is created by specific student.

4.5 Deployment Diagram:

Link Draw.io of the diagram: here

The Client will connect with the server using HTTPS protocol, the data received from
the Server are the files that execute the interface and will be displayed on users' browser
website via HTML5.

The backend execution environment is NodeJS, using .NET framework, consisting of


3 main components. The frontend execution environment is ReactJS, also consists of 3 main

81
Software Requirements Specification for
A smart printing service student at HCMUT

components. Through ASP.NET API, the frontend and backend sides can communicate with
each other to update, display interface, and receive responses from the users.

The Server will connect to the Database Server through TCP/IP protocol, to access
data displayed on the interface or update the data whenever the user interacts with the
application.

The Database Server includes MySQL DMBS. The Database Server stores data in
structured Relational Schemas.

4.6 Component Diagram:

Link Draw.io of the diagram: here

82
Software Requirements Specification for
A smart printing service student at HCMUT

4.6.1 View:
4.6.1.1 Print:
Main function: implements interface management classes for printing support.
Includes classes:
• PrintView: class provides page interface to perform file upload, printer selection
and printing operations.
• PrintForm: class provides form interface to fill in information about printing
parameters.
Relationship between components: PrintView class relies on information entered
from PrintForm to receive values about printing parameters and then send them to the
controller for processing.
PrintView implements PrintView, PrintInfo interface.
All components require PrintViewUpdate interface.

4.6.1.2 DocsView:
Main function: Implements classes that provide interfaces for viewing print history
and periodic reports.
Includes classes: PrintHistoryView, ReportView
• Class PrintHistoryView provides an interface for viewing student print history
(and printers if logged in by SPSO).
• Class ReportView provides an interface for viewing periodic reports.
Both components implement the DocumentView and DocsRequest interfaces.
Both components require the DocsViewUpdate interface.

4.6.1.3 PrintMangagement:
Main function: Implements the printer management interface for SPSO.
Both components implement the PrintManagementView, SystemChange interfaces.
Both components require the ManagementViewUpdate interface.

4.6.2 Controller:
4.6.2.1 PrintController:
Main function: implements a class that provides event handling methods and
information about user input print parameters, print balance accounts, and the print process. It
will get the PrintAPI from printer also.
Database control the printController to print the process.
Both Component implements the PrintViewUpdate, PrintOrderHistory, PrintProcess
Both components require the UsePrintInfo interface.

83
Software Requirements Specification for
A smart printing service student at HCMUT

4.6.2.2 DocsController:
Main function: implements classes that provide methods to process timestamps (or
add printer codes if SPSO) that users enter.
Includes classes: PrintHistoryController, ReportController.
• PrintHistoryController class provides methods to process information about
timestamps to view student printing history (and printer if SPSO).
• ReportController class provides methods to process timestamp information to
view periodic reports.
Both components implement the DocsViewUpdate and DocsInfoRequest interfaces.
Both components require DocsInfoResponse interfaces.

4.6.2.3 PrintManagementController:
Main function: Implements a class that provides methods for handling information
streams that require updating information about printer management.
Component implements the ManagementViewUpdate, SystemChangeInfo interfaces.
Component requires the ManagementInfo interfaces.

4.6.3 Model:
4.6.3.1 PrintManagementModel:
Main function: implements a class that provide information of System. It is not
included in Database.

4.6.4 Database:

Schema Printer, Student, Document are generated in Database for the main purpose
store data and retreive the history.

84

You might also like