Vous êtes sur la page 1sur 4

UNIVERSITI SAINS MALAYSIA

CPT111: Principles of Programming


ASSIGNMENT 3
1-Hostel USM (1Hostel)
Universiti Sains Malaysia has introduced 1-Hostel system for the hostel management to manage
hostel application applied by USMs students every year. 1-Hostel system allows students
information to be stored and access easily by officer in charge. Only students who are exceeded the
minimum score points will be considered and offered to stay in the Hostel for the next academic
year. Due to hostels room is limited and too demanding from students to stay in the USM hostel,
USM has introduced accumulated points system called continuous student development
(MyCSD). Each student should collect points within academic year in order to qualify them to apply
hostel for next academic year. The points can be collected by joining the activities organized by
USM, school and hostel. 1-Hostel also allows student to display their score points and their status
(qualified or not qualified to apply hostel). Thus, It will encourage them join more activities in USM.
Therefore, as a programmer, you are required to develop an application called 1-Hostel USM
(1Hostel) which will be used in USM. The purpose of 1-Hostel system is to help the USM hostel
management team to store and to manage students information by utilizing array. Your 1-Hostel
system must be able to perform some basic operations such as Add new students information,
Display and Search. The functional specifications of the required 1-Hostel system are as the follow:
1. The information to be stored is listed accordingly:
Matric No.
Course code (e.g. Computer Sciences CS, Biological Sciences BIO, etc.)
Name
Contact Number
Gender
Score points
2. 1-Hostel system should have at least the following functions:
Hostel managing officer
I.
II.
III.

IV.
V.

Read students information from text file (as shown in Fig. 1) and store into appropriate
arrays.
Display all students information
Display a list (name, matric no., gender) and total number of students based on: Score points. (e.g. those student whose score more than 80 points)
Qualified status (e.g. qualified or not qualified)
Qualified status by course code (e.g. enter Bio )
Gender (e.g. Male or Female)
Search and display specific students information
Update specific students score points

279131
280245
285123
.

CS
CS
BIO
..

Afendi
Ali
Aliph
..

0126722230
0137823491
0118203293
..

95
80
103
.....

.
..

.
.

.
.

.
.

.
..

Fig. 1 Sample text file


Student
I.

Display their collected points and their qualification status by entering their matric no.

Note: You can use the Matric no. as a search key.


Qualification status is calculated by the average of score points of all students + weighted
percentage. Weighted percentage is set by hostel management officer. E.g. if the average score
points is 90 and weighted percentage is 25% (90 + 0.25 * 90), then qualified status is 112.5.
Therefore, student must score at least 112.5 or above.
5. Your program must have the following:
I.
II.

III.
IV.
V.

Appropriate functions
Your functions should at least demonstrate: a. Receiving array as parameters
b. Passing parameters via value
c. Passing parameters via reference
d. Function with return value.
Input validation
Good Interface Design (i.e. Presentable manner and easy to understand)
Meaningful comments in the source codes
[You are NOT allowed to use global variable]

6. You are encouraged to add any additional function or any suitable elements that you have been
taught in class where appropriate to improve the usability and the functionality of your application
(i.e. Extra marks will be given accordingly).
INSTRUCTIONS:
Please submit your assignment (individually) by XXXXXXX in 2 versions:

Due Date: 05 Dec 2016 before 9.00 am.


1) Softcopy: Upload into e-learning. Save all the necessary documents in one folder and zip
the folder before you upload.
Please also provide a file that contains your test data [in .txt].
2) Hardcopy: Submit into post-box with label CPT111 at level 7. Please make sure that the
cover page color is used accordingly as in Table 1 with this compulsory information:
Course: CPT111
Assignment: 3
Due Date: XXXXXXXX
Name:
Matric No:
Group: <Please Refer to Table 1>
Lecturers Name: <Please Refer to Table 1>
2

Table 1
Group A or B (COVER COLOR GREEN)
Group C or D (COVER COLOR PURPLE)

Dr Jasy Liew Suet Yan & Dr Nur Intan Raihana


Encik Mohd Azam Osman

Group E or F (COVER COLOR BLUE)

Pn Hasimah

** Failing to comply with this compulsory information will be penalised **


Your report documentation must include the following details:
(i) Table of content and page numbers
(ii) Specification Requirements
includes inputs, outputs, process, and test data.
(iii) Design of the program.
- Program Structure diagram
- Function description, including:
Function name
Type of the function
List of parameters received
Purpose of the function
(vi) C++ code (source code) with appropriate/meaningful comments
(vii) Print screen of output (based on scenarios)
Note: The design of the program is unique according to individual!!!!!. Failure to
answer on program specification and explanation could lead you to be charged as
copy.
- Extra marks will be given to well-documented report The name of the folder that you upload must follow this standard: ASSN3_
MATRICNUMBER. Your file name is YOURMATRICNUMBER. Your folder consists of
the report, the source code and the test data.

Important Notes:
All assignments must be submitted before/on the given date. Late submissions
without prior approval from the lecturer will not be accepted.
Plagiarism/pirating and copying are serious academic offence. Students that are
found to plagiarize/or copying will get an F for the assignment/report or for the whole
coursework grade.

If you any queries about this assignment please do not hesitate to contact Mohd Azam Osman
(Room 712) azam@cs.usm.my

Vous aimerez peut-être aussi