[go: up one dir, main page]

0% found this document useful (0 votes)
179 views2 pages

Assignment Question 201705

The document describes an assignment to create a C++ application to manage staff records. It involves reading staff data from a text file and storing it in an array of structures. A menu will be displayed with options to list records, search by gender, age or keyword, update or add records, and delete records. When the program exits, changes made will be updated back to the text file. Students must form groups, design the application, write the C++ code, include sample outputs, and submit a report by the deadline. Plagiarism will result in a zero mark.

Uploaded by

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

Assignment Question 201705

The document describes an assignment to create a C++ application to manage staff records. It involves reading staff data from a text file and storing it in an array of structures. A menu will be displayed with options to list records, search by gender, age or keyword, update or add records, and delete records. When the program exits, changes made will be updated back to the text file. Students must form groups, design the application, write the C++ code, include sample outputs, and submit a report by the deadline. Plagiarism will result in a zero mark.

Uploaded by

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

UECS1643/UECS1653 FUNDAMENTALS OF PROGRAMMING

Assignment

Description
Write an application in C++ for a company to keep track of staff records. Create at least 20 records (staff
name, staff ID, position, IC number, date joined, address (city), and contact number – you may add more)
in a text file. The application should read the staff records from the text file and insert them into an array
of structures.
After the records are stored to the array, display a menu with the following options:
(a) List – Display the list of all records. The display should contain an appropriate heading and
column captions;
(b) Search by gender – Search and display all male or female staff records depending on user’s
selection;
(c) Search by age – Ask user for current year and the age to search for. Print out all the records
which match the searched age. You have to tell no records found if none of them matches the
searched age; (Refer to example below)
(d) Search by keyword – Search the records using a keyword and print out all the records which
match the searched keyword. You have to tell no records found if none of them matches the
keyword; (Refer to example below)
(e) Update – Ask user for a staff name and staff ID. If any record matches the two entries, user will
be asked to key in the new data for position, address, and contact number. Then the record will be
updated accordingly;
(f) Add – Add a new record to the list;
(g) Delete – Delete a record from the list;
(h) Exit – Stop the program. Once the exit option is chosen, the application will update the text file
accordingly with all the changes which have been done.
Sample text file
Staff Name Staff ID Position IC Number Date Joined Address (City) Contact Number
Tan Yew Lun 03022 Senior Executive 730202-07-6031 22/02/2003 Petaling Jaya 012-2711198
Abdul Malik 12051 Driver 750722-08-3211 03/11/2012 Kota Damansara 016-3338888
Yunice Wong 08038 Executive 751103-10-2468 30/08/2008 Damansara Jaya 019-6881237
Kok Lai Fah 03010 Manager 700215-04-1266 01/02/2003 Kota Kemuning 017-6869910
Muthu a/l Rajan 17012 Clerk 851208-08-5673 15/03/2017 Bandar Utama 011-3402355

Example for Part (c)


Please enter current year: 2017
Please enter the age to search for: 42
Staff Name Staff ID Position IC Number Date Joined Address (City) Contact Number
Abdul Malik 12051 Driver 750722-08-3211 03/11/2012 Kota Damansara 016-3338888
Yunice Wong 08038 Executive 751103-10-2468 30/08/2008 Damansara Jaya 019-6881237

Example for Part (d)


If search by keyword “ma”, the application will display the following result:
Staff Name Staff ID Position IC Number Date Joined Address (City) Contact Number
Abdul Malik 12051 Driver 750722-08-3211 03/11/2012 Kota Damansara 016-3338888
Yunice Wong 08038 Executive 751103-10-2468 30/08/2008 Damansara Jaya 019-6881237
Kok Lai Fah 03010 Manager 700215-04-1266 01/02/2003 Kota Kemuning 017-6869910
Muthu a/l Rajan 17012 Clerk 851208-08-5673 15/03/2017 Bandar Utama 011-3402355

Note: You have to make your application case-insensitive, that is, uppercase letters will be treated the
same as lowercase letters.
Assessment and Submission
This is a group assignment. Form a group of 4 – 5 members, from the same practical group (if can’t, must
be from the same practical lecturer group). Prepare a report to answer the questions given above. Your
REPORT SHOULD CONTAIN the following:
1. Design of the application (structure chart and flowcharts/pseudocode)
2. Print out of the C++ program
3. Input text file
4. Sample outputs (Alt+Prnt Scrn) of your program
5. Sample of input data and test cases

Submit the report by Tuesday, 22/8/2017, 6:30 pm. The zipped project folder with the sample text file,
C++ source code and word document need to be uploaded to WBLE by group leader before 5:00 pm
same day. Members do not need to upload.

Do remember to print the assignment marking sheet and attach as the FIRST PAGE of your report. Put
the group leader’s name as the first name in the marking sheet. This practical assignment will contribute
15% of your final mark. The report will be marked for correctness, completeness, presentation style, and
relevant use of diagrams/tables, etc. And the C++ program will be marked for correctness, completeness,
program style, adequate testing and documentations. It’s your responsibility to understand the
requirements of the tasks and prepare well for your submission. You will not get a high mark if you do
not submit the report and C++ program that is a reasonable attempt and compiles without error. You
might be asked questions about the works you submitted to ensure that they are your original works and
you understand them well.

Plagiarism
It is important that your solutions to the practical assignment be your own work. It is perfectly acceptable
to seek advice when completing the practical assignment, but this must not be taken to the point where
what submitted is in part someone else's work. Anyone caught red-handed will be given zero mark.

You might also like