Sei sulla pagina 1di 12

Introduction to C Programming Individual Assignment Page 1 of 12

Test Specification Table (Sample)

CLO1 Explain the concept of C Programming. (C2, PLO1) Final Exam

CLO2 Outline a solution with the help of Pseudocode and Individual Assignment
Graphical representation. (C1, PLO3)

CLO3 Construct the outlined solution into a software Individual Assignment


application using C programming. (C3, PLO6)

Individual Assignment (80%):


Question Vs Taxonomy
Question Cognitive Level
No. Topic 1 2 3 4 5 6 PLO
SQ SQ SQ SQ SQ SQ
Design with Pseudocode and
1 20% 3
Flowchart
Application using C Programming
2 80% 6
Concepts
Total 100%

1.0INDIVIDUAL ASSIGNMENT DESCRIPTION

 For CS/CS(DA)/IT/IT(IOT)/IS Programmes

WISDOM COLLEGE HOSTEL MANAGEMENT SYSTEM

Wisdom College in Langkawi is providing accommodation for its students. The types
of accommodation and its related details are given in the table below:
Block Gender Room Type Rooms Weekly Rate (RM)
per
Room Internet Meal Laundry Gym
Block
A1 Single Bed 400 40
A2 2-Bedded 200 20
Male
A3 3-Bedded 150 15
A4 4-Bedded 100 10
100 120 20 10
B1 Single Bed 400 40
B2 2-Bedded 200 20
Female
B3 3-Bedded 150 15
B4 4-Bedded 100 10
You are required to write a program for managing the hostel booking of Wisdom
College.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 2 of 12

Following are the features that the program should have:


i. Store hostelers’ details like student ID, name, gender, room details, amount
due, payment made and any other relevant details.
ii. Check room availability by type and gender in each block.
iii. Allow booking as per gender and room type.
iv. Bill based on number of weeks of booked by hosteler.
v. Search hosteler’s room detail.
vi. Provide payment facility.
vii. Allow early (or mid-way) cancellation.
viii. Allow change of room type.
ix. Print amount receivable from each hosteler either by block or room type.
x. Print total amount receivable and total payment received.

You are required to store all data in text files. There is no limit on the number of text
files that can be used but they should be kept minimum. You should use array,
structures and functions (called by value and/or reference) in your program. All the
features in your program must be coded in separate functions and called from a menu
function. You may include some analytics in your program as additional features like
percentage of occupancy by gender or room type; percentage of occupants who stay
with/without subscribing to meal and/or laundry service; or any other feature(s).

Important Note:
Due to some delay in construction, assume only 4 blocks are ready for occupancy
which include at least one from block A1-A4 and one from block B1-B4. Also, due to
some reasons, only two of the services with an exclusion of meals OR only one of
services with an inclusion meal are available for subscription. Hence, you are required
to check with your lecturer the blocks and service(s) (with/without meal) that are
available for you to consider when writing the program. Take note that each of you
will be assigned with different group of blocks and service(s) (with/without meal) to
work on.

 For CGD Programme

SLIDING PUZZLES (8- AND 15-PUZZLE)

Sliding puzzles are games that require players to slide and play the game. 8-puzzle is
a kind of sliding puzzle game that requires the player to slide the numbers on the
board and arrange them in ascending order. Sample sliding movements in 8-puzzle
game is shown in the following figure:

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 3 of 12

After a number of further movements, the state of puzzle is reached as in the figure
below until reaching the winning state:

Similarly, a 15-puzzle contains numbers from 1 to 15 and an empty space for sliding.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 4 of 12

You are required to simulate both 8- and 15-puzzle games in your program. Every
player needs to be registered and given a player code before playing the game. The
player code has to be generated by the program and must be in sequence, starting
from 1001. The player codes and their respective names have to be stored in a text
file. The file has to be checked for player name duplication before a new player is
registered and given a new player code.

The achievement of the players, i.e. the number of steps taken for winning each of the
puzzles need to be stored in another two different text files, i.e. one for 8-puzzle
winners and the other for 15-puzzle winners. The puzzle winner files must only
contain player code and number of steps taken to win the game. Altogether, there
should be at least 3 text files.

Players should be directed to 8-puzzle followed by 15-puzzle game. Players can exit
the game at any point of time should they feel so. After winning each puzzle, the
program must display the details of other winners of the same puzzle. The list must be
tabulated with player code, player name and number of steps taken for winning the
puzzle. The table must be sorted with players who won the game with least number of
steps being listed first.

You should use array, structures and functions (called by value and/or reference) in
your program. All the features in your program must be coded in separate functions
and called from a menu function. You may include some additional features in your
program like allowing players who had won both puzzles to play selected puzzle
again for improving their achievements; or any other useful and interesting features.

 For Engineering Programme

QUEUE MANAGEMENT SYSTEM

You have been approached by the University to develop a simple Queue Management
System for APU collection centre. This system has two parts. The first part requires you
to develop a program to simulate a queue management system while the second requires
you to store each teller’s activity in a text file and produce their productivity report.

First Part
The   queue   management   system   consists   of   four   main   components   namely   Ticket
Dispenser   Device,   LED   Counter   Display,   Calling   Device   (keypad)   and   Counter
Controller as shown in the Figure 1.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 5 of 12

Figure 1: Queue Management System

The Counter Controller will act as a brain of the system, which will control and manage
the following devices: 

i. Ticket Dispenser Device 
 Dispense tickets to customer when he or she entered the premises and tabbed 
the button on the screen.

Dispensed ticket will show the current running number and number of persons
waiting in queue.

ii. LED Counter Display 
 Shows   current  queue   number  and  counter   number.   It   will   display  the
current queue number and its respective counter.

Figure 2 shows the Pin Diagram of LED Counter Display.   Following are the
description for the pins in LED Counter Display: 
 D0 – D7 data pins are used to read / write data to the LED Counter Display.
These pins are used to display a queue number from 000 to 255. The queue
number should be reset to 000 at beginning of each day that is before the
operation   of   the   collection   center   or   when   the   students   visiting   the   center
exceeds 255. All the pins are set to 0 when the reset function is applied. For
initial queue number 001, only pin D7 will be set to 1 and the rest are set to 0.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 6 of 12

 VSS, VDD and VEE are voltage supply pins. 
 RS pin is to choose either instruction register or data register to write the data.
The E pin (enable pin) is used to enable the write operation to the register.
However,   in   our   case,   we   will   use   these   two   pins   to   indicate   the   counter
number. Set both pins to zero when indicating counter 1; set RS pin to 0 and E
pin 1 when you want indicate counter 2; set RS pin to 1 and E pin 0 when you
want indicate counter 3; and set both of them to 1 when indicating counter 4.  
 R/W pin will be used to select a particular mode (read/write) data from/to
LED Counter Display. R/W pin is set to 0 or 1 for reading/writing data from/to
LED Counter Display respectively. You are required to set the value for R/W
pin   before   performing   the   read   or   write   operation   on   the   LED   Counter
Display.

Figure 2: LED Counter Display Pin Diagram

iii. Calling Device (Keypad)
 Used for calling a specific queue number.
 Used for echoing the current queue number if required.
 Used for calling the next queue number.

Keypad used as Calling Device is shown in Figure 3 below. As there are not many
keys available on this keypad, you are required to carefully mapped the keys in
them   to   the   functionalities   required   in   this   system.   Also   take   note   that   same
Keypad will be used to echo the called number if required.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 7 of 12

Figure 3: Keypad Used as Calling Device 

Second Part
Every service provided by the tellers at each counter is recorded in a text file. Sample text
file is shown in Figure 4 below. You are required to store at least the date of service,
counter number and queue number served as shown in the text file. For time being we
will assume that each counter is managed by the same staff until he/she resigns or is been
promoted or transferred to other branch. You are required to build a function to read the
content of this file into a structure and count the number of customers served by each
teller from beginning until now. Finally, their productivity is displayed as shown in Figure
5.

Figure 4: Sample Text File Keeping Service Records

Figure 5: Productivity Report by Staff

2.0REQUIREMENTS

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 8 of 12

i. You are required to carry out extra research for your system and document any
logical assumptions you made after the research.

ii. Your program should use symbolic constants where appropriate. Validations need
to be included to ensure the accuracy of the system. State any assumptions that
you make under each function.

iii. Your program must be modular, user-friendly using programming techniques that
you have learnt. You may include any extra features which you may feel relevant
and that add value to the system. The menus could be modified in order to
facilitate more options.
iv. There should be no need for graphics in your program, as what is being assessed,
is your programming skill not the interface design. The marking scheme for the
assignment has been provided so that you clearly know how the assessment for
this assignment would be done.

v. You should include the good programming practice such as comments, variable
initialisation, naming conventions and indentation.

vi. In a situation where the students,


- Failed to attempt the assignment demonstration, overall marks awarded for
the assignment will be adjusted to 50% of the overall existing marks

vii. You are required to use portable ANSI C to implement the solution. Use of any
other language like C++/java etc is not allowed. Global data is not allowed.

viii. Results of a comprehensive testing is to be included in your document. Each


testing shall include test procedure, pre-condition, expected result and result
produced. The tests conducted shall take into consideration of all valid inputs and
negative test cases.

3.0DELIVERABLES

You are required to submit:

i. A softcopy of the program coded in C – submitted in a CD. The program should


include the following:
- Basic C concepts such as displaying and reading of text, variables, and
assignment of values, comments – to explain various parts of the program, etc.
- Intermediate C concepts such as control structures – selection and iteration
control structures, use of arrays – single / double scripted, string.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 9 of 12

- Advanced C concepts such as functions – programmer defined and library


functions, pointers, structures, unions, linked list and files.
- Any other features of C that has not been covered.

ii. A documentation of the system, that incorporates basic documentation standards


such as header and footer, page numbering and which includes
- Cover page
- Table of contents
- Introduction and assumptions
- Design of the program – using pseudocode and flowcharts – which adheres to
the requirements provided above
- Explanation of portable ANSI C programming concepts applied with sample
segment of source code from the system created.
- Additional features which have been incorporated in the solution in terms of
design and C codes (sample segment of source code from the system created)
- Test specification table.
- Sample outputs when the program is executed with some explanation of the
outputs / sections of the program
- Conclusion
- References – Harvard Name Referencing

iii. CD Content
- Documentation file (.doc file if using Ms-Word)
- Program / Source files (.c files)
- Header files (.h files) - optional
- Executable file (.exe file)

iv. Binding and Submission


- The documentation (attached with the CD) must be comb bound and
submitted to the Academic Administration on the 12th June, 2019 latest by
7.00 p.m.

4.0ASSESSMENT CRITERIA

i. Design solution (Flowchart and Pseudocode) 20%


Detailed, logical and application of appropriate idea.

ii. Coding / Implementation 30%


Appropriate application of C concepts (from basic to advance), good solution
implemented with validation and met all the requirements with additional features.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 10 of 12

iii. Documentation 15%


Overall standard and layout, referencing (Harvard), screen capture and
assumptions.

iv. Test 10%


Answered the questions posed based on the assignment submitted.

v. Demonstration 5%
Know how to execute and able to trace the system

vi. Question and Answer 20%


Answered the questions based on the assignment submitted during presentation.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 11 of 12

5.0PERFORMANCE CRITERIA

Distinction (75% and above)


This grade will be assigned to work which meets all of the requirements stated in the
question. The program runs smoothly when executed. There is clear evidence and application
of C concepts up to advanced level. The program solution is unique with excellent coding
styles and validation. The program implemented maps completely against the design (pseudo
code and flowchart) as seen in the documentation. The design of the solution varies in styles
and has unique logic with hardly any errors / omissions. The documentation does not have
any missing components. Sample outputs documented have clear explanation. All work is
referenced according to Harvard Name Referencing convention. Student must be able to
provide excellent explanation of the codes and work done, show additional concepts / new
ideas used in the solution, able to answer all questions posed with accurate / logical answers /
explanation provided with sound arguments and clear discussion. Overall an excellent piece
of work submitted.

Credit (65%-74%)
This grade will be assigned to work which is considered to be of good standard and meets
most of the requirements stated in the question. The program runs smoothly when executed.
There is clear evidence and application of C concepts up to at least intermediate level. The
program solution is unique with good coding styles and validation. The program
implemented maps well against the design (pseudo code and flowchart) as seen in the
documentation. The design of the solution varies in styles and has unique logic with minor
errors / omissions. The documentation does not have any missing components. Sample
outputs documented with some explanation. All work is referenced according to Harvard
Name Referencing convention but with some minor errors / omissions. Student must be able
to provide good explanation of the codes and work done, answer most questions posed with
mostly accurate / logical answers / explanation. Overall a good assignment submitted.

Pass (50%-64%)
This grade will be assigned to work which meets at least half of the basic requirements
(approximately 50%) stated in the questions. The program runs smoothly when executed.
There is clear evidence and application of C concepts at basic level. The program solution is
common with basic coding styles and validation. The program implemented somewhat maps
with the design (pseudo code and flowchart) as seen in the documentation. The design of the
solution is average in terms of logic and style with some errors / omissions. The
documentation has some missing components. Sample outputs documented but without any
explanation. Did some referencing but not according to Harvard Name Referencing
convention and with some minor errors / omissions. Student must be able to explain some
codes and work done and able to answer some questions posed with some accurate / logical
answers / explanation. Overall an average piece of work submitted.

Level 1 Asia Pacific University College of Technology and Innovation 2019


Introduction to C Programming Individual Assignment Page 12 of 12

Fail (Below 50%)


This grade will be assigned to work which achieved less than half of the requirements stated
in the question. The program is able to compile but not able to execute or with major error.
The program solution has only basic coding styles with no validation. The program solution
has little or no mapping with the design. The design of the solution has major / obvious errors
/ omissions. The documentation has some missing essential components. No referencing.
Student is barely able to explain the codes / work done and answer given on the questions
posed but with mostly inaccurate / illogical answers / explanation. Overall a poor piece of
work submitted.

Level 1 Asia Pacific University College of Technology and Innovation 2019

Potrebbero piacerti anche