0% found this document useful (0 votes)
51 views31 pages

CSC 126 GP Report

Uploaded by

abu dawud
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)
51 views31 pages

CSC 126 GP Report

Uploaded by

abu dawud
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/ 31

UNIVERSITI TEKNOLOGI MARA

PROJECT REPORT
(STUDENTS FINE SYSTEM)
TEAM MEMBERS :
1.MUHAMMAD ANIQ SYAMIL BIN MOHD AZMAN (2023889366)
2. ABU DZAR RAMZANIZAM (2023865136)
3. MUHAMMAD AIMAN BIN MOHD ZIN (2023831356)
4. ADAM HAIKAL BIN MOHD RUDZI (2023871028)

: RCDCS1101E

LECTURER : MADAM UMI

1
TABLE OF CONTENTS

1.0 PROJECT SUMMARY ..................................................................................................... 3

2.0 OBJECTIVE OF THE PROJECT ...................................................................................... 3

3.0 INPUT/PROCESS/OUTPUT ............................................................................................. 4

4.0 FLOWCHART .................................................................................................................. 5

5.0 PSEUDOCODE ................................................................................................................ 7

6.0 SOURCE CODE ............................................................................................................. 11

7.0 SAMPLES OF OUTPUT ................................................................................................. 15

8.0 DISCUSSION ................................................................................................................. 18

9.0 CONCLUSION ............................................................................................................... 18

2
1.0 PROJECT SUMMARY

UiTM Student Fine Program is a system built to help UiTM staffs keying in the information of the students
fault and students can check and pay for their fine without going to the HEP offices.Before this students have
to write their names and list all the fault that they did within the UiTM campus rules in a piece of paper that
are easily lost or destroyed. This can cause dishonest and faulty behavior to culprits that can destroy
evidence of what have they done. The UiTM Student Fine Program stores information for the Uitm staffs to
key in the fine that students receive. The program will keep all the data in the students ID with that students
need to login and check their fined to make sure that they pay their fine. Some information must be gathered
by the program to initialize the fine of the students by logging in for the program to run. In the final stages of
calculation, the program will display ID, students fault, amount payable.

2.0 OBJECTIVE OF THE PROJECT

-Developing a system that stores all the data of students that disobeyed the UiTM campus law.

-Developing a new revolutionary system that can be monitored and saved in a computerized system

-Developing an opportunity to UiTM staffs to help UiTM having greener environment

3
3.0 INPUT/PROCESS/OUTOUT

Specified Process
First of all user will need to choose whether to start the program or not,
After that, user will need to register to ensure it’s not a robot.
User will register their name ,uitm ID and create a password

Function (main)
• “Please enter your uitm id.
• “Please enter your password”

After the registration complete, the main operation will begin with determine if string compare registered uitm id and
registered uitm is equal to login uitm id and login password.

Function (menu)
• “Please select SRD , Hostel , Vehicles “
• If “SRD”
- Self appearance(using array)
• If “Hostel “(using array)
- Smoking
- Forbidden item
- Dirty room
- Vandalism
- Disturbing
- Sleep in a restricted area
• If ” Vehicles “(using array)
- Not registered vehicles
- Exceeding the speed limit
- Not wearing helmet
- Vehicles impounded
- Bring vehicles illegally

We will begin calculation afterwards.

4
Calculation
• Total fine = fine chosen by student.

Last part would be repeatition

Repeatition
• “Do you want to enter another fault ?

5
Input Name
. Uitm Id
Password
Entered uitm id
Entered password
Type of fault
Fault Code
Respond

total fine =fine


Process fine=fine of each fault type

Output

Name of fault,
total fine
type of fault

6
4.0 FLOWCHART

7
8
9
10
11
5.0 PSEUDOCODE

START

Procedure srd_fault();
Procedure hostel_fault();
Procedure vehicle_fault();

Procedure Main():
String name, password, entered_password, id, enteredID, res
Integer ic, type

Output("\t--------REGISTRATION UITM FINE SYSTEM--------")


Output("\n\n")
Output("\t First of All, Please enter your name, identity number, ID, and password")
Output("\n")
Output("\tPlease Enter Your Name: ")
Input(name)
Output("\tPlease Enter Your UITM Id: ")
Input(id)
Output("\tPlease Create Your Password: ")
Input(password)

Output("\tThank you for the registration!!")


Output("\n")
Output("\t--------WELCOME TO UITM FINE SYSTEM--------")
Output("\n\n")
Output("\tPlease enter your UITM ID and Password for Login....")
Output("\n")
Output("\tUITM ID: ")
Input(enteredID)
Output("\tPASSWORD: ")
Input(entered_password)

If (id equals enteredID) AND (password equals entered_password):


Repeat
Output("\t--------WELCOME TO STUDENT MENU UITM FINE SYSTEM--------")
Output("\n\n")
Output("\tPlease select category fault for student")
Output("\tEnter 1 for Self Appearance")
Output("\tEnter 2 for Hostel")
Output("\tEnter 3 for Vehicles")
Output("\t")
Input(type)

Switch type:
Case 1: srd_fault()
Case 2: hostel_fault()
Case 3: vehicle_fault()
Default: Output("\tInvalid Type Fault....")

12
Output("\tPlease enter 'y' to continue the system...")
Input(res)
Until res is not equal to 'y'

Else:
Output("\tInvalid ID or Password")

Output("\tPlease Save the statement and bring it to HEP Department for settlement fine...")
Output("\tThank you for using Fine UITM Portal....")
SystemPause()
End Procedure
module srd_fault():
// Define SRD fault information
Array code_fault[1 to 3] = {1, 2, 3}
Array name_fault[1 to 3][1 to 50] = {
"Does not Meet SRD during academic session",
"Long Hair, Mustache, Beard and Colored Hair",
"Forbidden Accessories"
}
Array fine_fault[1 to 3] = {50, 30, 20}

// Variables for user input and storing fault details


Integer code
Integer fine
String name

// Display SRD fault information


Output("\t================")
Output("\tSRD List Fault")
Output("\t================")

Output("\n\t+------+------------+-----------+")
Output("\t| Code | Fault | Fine(RM) |")
Output("\t+------+-------------+----------+")

For i = 1 to 3:
Output("\t| " + code_fault[i] + "| " + LeftAligned(name_fault[i], 11) + "| " + LeftAligned(fine_fault[i], 7) + " |")

// Get user input for fault code


Output("\tType Code: ")
Input(code)

// Validate user input


While code < 1 OR code > 3:
Output("\tInvalid Type Code!")
Output("\tChoose Type Code: ")
Input(code)

// Assign fault details based on the selected code


If code == 1:
name = name_fault[1]
fine = fine_fault[1]
13
ElseIf code == 2:
name = name_fault[2]
fine = fine_fault[2]
ElseIf code == 3:
name = name_fault[3]
fine = fine_fault[3]

// Display selected fault details


Output("\n\t+++++++++++++++++++++++++++++++++++")
Output("\tCode Fault : " + code)
Output("\tName Fault : " + name)
Output("\tFine Fault : RM " + fine)
End module

Procedure hostel_fault():
// Define Hostel fault information
Array code_fault[1 to 6] = {1, 2, 3, 4, 5, 6}
Array name_fault[1 to 6][1 to 50] = {"Smoking", "Forbidden Item", "Dirty Room", "Vandalism", "Disturbing Peace",
"Sleeping Restricted Area"}
Array fine_fault[1 to 6] = {50, 50, 30, 70, 30, 30}

// Variables for user input and storing fault details


Integer code
Integer fine
String name

// Display Hostel fault information


Output("\t==================")
Output("\tHostel List Fault")
Output("\t==================")

Output("\n\t+------+------------+-----------+")
Output("\t| Code | Fault | Fine(RM) |")
Output("\t+------+-------------+----------+")

For i = 1 to 6:
Output("\t| " + code_fault[i] + "| " + LeftAligned(name_fault[i], 11) + "| " + LeftAligned(fine_fault[i], 7) + " |")

// Get user input for fault code


Output("\tType Code: ")
Input(code)

// Validate user input


While code < 1 OR code > 6:
Output("\tInvalid Type Code!")
Output("\tChoose Type Code: ")
Input(code)

// Assign fault details based on the selected code


If code == 1:
name = name_fault[1]
14
fine = fine_fault[1]
ElseIf code == 2:
name = name_fault[2]
fine = fine_fault[2]
ElseIf code == 3:
name = name_fault[3]
fine = fine_fault[3]
ElseIf code == 4:
name = name_fault[4]
fine = fine_fault[4]
ElseIf code == 5:
name = name_fault[5]
fine = fine_fault[5]
ElseIf code == 6:
name = name_fault[6]
fine = fine_fault[6]

// Display selected fault details


Output("\n\t+++++++++++++++++++++++++++++++++++")
Output("\tCode Fault : " + code)
Output("\tName Fault : " + name)
Output("\tFine Fault : RM " + fine)
End Procedure

Procedure vehicle_fault():
// Define Vehicle fault information
Array code_fault[1 to 5] = {1, 2, 3, 4, 5}
Array name_fault[1 to 5][1 to 50] = {
"Vehicle not registered",
"Exceeding speed limit",
"Not wearing helmet",
"Vehicle impounded",
"Illegal Vehicle"
}
Array fine_fault[1 to 5] = {70, 50, 30, 100, 200}

// Variables for user input and storing fault details


Integer code
Integer fine
String name

// Display Vehicle fault information


Output("\t==================")
Output("\tVehicle List Fault")
Output("\t==================")

Output("\n\t+------+------------+-----------+")
Output("\t| Code | Fault | Fine(RM) |")
Output("\t+------+-------------+----------+")

For i = 1 to 5:
Output("\t| " + code_fault[i] + "| " + LeftAligned(name_fault[i], 11) + "| " + LeftAligned(fine_fault[i], 7) + " |")
15
// Get user input for fault code
Output("\tType Code: ")
Input(code)

// Validate user input


While code < 1 OR code > 5:
Output("\tInvalid Type Code!")
Output("\tChoose Type Code: ")
Input(code)

// Assign fault details based on the selected code


If code == 1:
name = name_fault[1]
fine = fine_fault[1]
ElseIf code == 2:
name = name_fault[2]
fine = fine_fault[2]
ElseIf code == 3:
name = name_fault[3]
fine = fine_fault[3]
ElseIf code == 4:
name = name_fault[4]
fine = fine_fault[4]
ElseIf code == 5:
name = name_fault[5]
fine = fine_fault[5]

// Display selected fault details


Output("\n\t+++++++++++++++++++++++++++++++++++")
Output("\tCode Fault : " + code)
Output("\tName Fault : " + name)
Output("\tFine Fault : RM " + fine)
End Procedure

16
6.0 SOURCE CODE

#include<iostream>
#include<iomanip>
#include<string.h>
using namespace std;

void srd_fault();
void hostel_fault();
void vehicle_fault();

int main()
{
char name[30],password[100],entered_password[100],id[11],enteredID[11],res;
int ic,type;

//User Register First to determine that user not robot


cout<<"\t--------REGISTRATION UITM FINE SYSTEM--------"<<endl;
cout<<endl;
cout<<endl;
cout<<"\t First of All ,Please enter your name,identity number,ID and password"<<endl;// user input the detail
required
cout<<endl;
cout<<"\tPlease Enter Your Name:";
cin>>name;
cout<<endl;
cout<<"\tPlease Enter Your UITM Id:";
cin>>id;
cout<<endl;
cout<<"\tPlease Create Your Password:";
cin>>password;
cout<<endl;

cout<<"\tThank you for the registration!!"<<endl;


cout<<"\n";

//After User successful register proceed to login


cout<<"\t--------WELCOME TO UITM FINE SYSTEM--------"<<endl;
cout<<endl;
cout<<endl;
cout<<"\tPlease enter your UITM ID and Password for Login...."<<endl;
cout<<endl;
cout<<"\tUITM ID:";
cin>>enteredID;
cout<<"\tPASSWORD:";
cin>>entered_password;

//If ID and password ==0 program will display menu


if ((strcmp(id,enteredID) == 0)&&(strcmp(password,entered_password) == 0))
{
17
do
{
cout<<"\t--------WELCOME TO STUDENT MENU UITM FINE SYSTEM--------"<<endl;
cout<<endl;
cout<<endl;
cout<<"\tPlease select category fault for student"<<endl;
cout<<"\tEnter 1 for Self Apperance"<<endl;
cout<<"\tEnter 2 for Hostel"<<endl;
cout<<"\tEnter 3 for Vechiles"<<endl;
cout<<"\t";
cin>>type;

switch(type)//program using switch case to determine type of fault


{
case 1: srd_fault();
break;
case 2: hostel_fault();
break;
case 3: vehicle_fault();
break;

default:cout<<"\tInvalid Type Fault...."<<endl;

}
cout<<"\tPlease enter y to continue the system..."<<endl;
cin>>res;
}while (res=='y') ;

}
else// If ID and password user !=0
cout<<"\tInvalid Id or Password"<<endl;

cout<<"\tPlease Save the statement and bring it to HEP Deparment for settlement fine..."<<endl;
cout<<"\tThank you for using Fine UITM Portal...."<<endl;

system("Pause");
}

void srd_fault() //First Type of Fault


{
int code_fault[3]={1,2,3};
char name_fault[3][50]={"Does not Meet Srd during academic session","Long Hair,Mustache,Beard and
Coloured Hair","Forbidden Accessories"};
int fine_fault[3]={50,30,20};

int code;
int fine;
string name;

18
cout << "\t================" <<endl;
cout << "\tSRD List Fault" <<endl;
cout << "\t================" <<endl;

cout <<endl;
cout << "\t+------+------------+-----------+" <<endl;
cout << "\t| Code | Fault | Fine(RM) |" <<endl;
cout << "\t+------+-------------+----------+" <<endl;

for (int i = 0; i <3; i++) // program using array and repition


{
cout << "| " << code_fault[i];
cout << "| ";
cout << setw(11) << left << name_fault[i];
cout << "| ";
cout << setw(7) << left << fine_fault[i] << " |" <<endl;
}

cout << "\tType Code: ";


cin >> code;

while (code <1 || code >3)


{
cout << "\tInvalid Type Code!" <<endl;
cout << "\tChoose Type Code: ";
cin >> code;
}

if (code == 1)
{
name = name_fault[0];
fine = fine_fault[0];
}

else if (code == 2)
{
name = name_fault[1];
fine = fine_fault[1];
}

else if (code == 3)
{
name = name_fault[2];
fine = fine_fault[2];
}

cout << "\n\t+++++++++++++++++++++++++++++++++++" <<endl;


cout << "\tCode Fault : " << code <<endl;
cout << "\tName Fault : " << name <<endl;
cout << "\tFine Fault :RM " << fine <<endl;
19
}

void hostel_fault() // Second Type of Fault


{
int code_fault[6]={1,2,3,4,5,6};
char name_fault[6][50]={"Smoking","Forbidden Item","Dirty Room","Vandalism","Disturbing Peace","Sleeping
Restricted Area"};
int fine_fault[6]={50,50,30,70,30,30};

int code;
int fine;
string name;

cout << "\t==================" <<endl;


cout << "\tHostel List Fault" <<endl;
cout << "\t==================" <<endl;

cout <<endl;
cout << "\t+------+------------+-----------+" <<endl;
cout << "\t| Code | Fault | Fine(RM) |" <<endl;
cout << "\t+------+-------------+----------+" <<endl;

for (int i = 0; i <6; i++) //program using array and repition


{
cout << "| " << code_fault[i];
cout << "| ";
cout << setw(11) << left << name_fault[i];
cout << "| ";
cout << setw(7) << left << fine_fault[i] << " |" <<endl;
}

cout << "\tType Code: ";


cin >> code;

while (code <1 || code >6)


{
cout << "\tInvalid Type Code!" <<endl;
cout << "\tChoose Type Code: ";
cin >> code;
}

if (code == 1)
{
name = name_fault[0];
fine = fine_fault[0];
}

else if (code == 2)
{
20
name = name_fault[1];
fine = fine_fault[1];
}

else if (code == 3)
{
name = name_fault[2];
fine = fine_fault[2];
}

else if( code == 4)


{
name = name_fault[3];
fine = fine_fault[3];
}

else if ( code == 5)
{
name = name_fault[4];
fine = fine_fault[4];
}

else if ( code == 6)
{
name = name_fault[5];
fine = fine_fault[5];
}

cout << "\n\t+++++++++++++++++++++++++++++++++++" <<endl;


cout << "\tCode Fault : " << code <<endl;
cout << "\tName Fault : " << name <<endl;
cout << "\tFine Fault :RM " << fine <<endl;

void vehicle_fault() //Third type of Fault


{
int code_fault[5]={1,2,3,4,5};
char name_fault[5][50]={"Vehicle not registered","Exceeding speed limit","Not wearing helmet","Vehicle
impounded","Illegal Vehicle"};
int fine_fault[5]={70,50,30,100,200};

int code;
int fine;
string name;

cout << "\t==================" <<endl;


cout << "\tVehicle List Fault" <<endl;
21
cout << "\t==================" <<endl;

cout <<endl;
cout << "\t+------+------------+-----------+" <<endl;
cout << "\t| Code | Fault | Fine(RM) |" <<endl;
cout << "\t+------+-------------+----------+" <<endl;

for (int i = 0; i <5; i++) //program user array and repition


{
cout << "| " << code_fault[i];
cout << "| ";
cout << setw(11) << left << name_fault[i];
cout << "| ";
cout << setw(7) << left << fine_fault[i] << " |" <<endl;
}

cout << "\tType Code: ";


cin >> code;

while (code <1 || code >6)


{
cout << "\tInvalid Type Code!" <<endl;
cout << "\tChoose Type Code: ";
cin >> code;
}

if (code == 1)
{
name = name_fault[0];
fine = fine_fault[0];
}

else if (code == 2)
{
name = name_fault[1];
fine = fine_fault[1];
}

else if (code == 3)
{
name = name_fault[2];
fine = fine_fault[2];
}

else if( code == 4)


{
name = name_fault[3];
fine = fine_fault[3];
}

else if ( code == 5)
{
name = name_fault[4];
22
fine = fine_fault[4];
}

cout << "\n\t+++++++++++++++++++++++++++++++++++" <<endl;


cout << "\tCode Fault : " << code <<endl;
cout << "\tName Fault : " << name <<endl;
cout << "\tFine Fault : RM " << fine <<endl;

23
6.0 SAMPLES OF OUTPUT

Login page:

24
25
26
Login invalid (repeatation)

27
Login pick

28
Login with receipt

29
8.0 DISCUSSION

1. User Registration and Authentication:

Implement additional security measures such as encryption for storing passwords.


Consider incorporating email verification or multi-factor authentication for enhanced security.

2.Menu-Driven System:

-Enhance the user interface by providing more detailed information about each fault category.
-Implement a clearer navigation system to guide users through the different options.

3.Fine Categories:

-Use a data structure like a struct or class to better organize information about each fault category.
-Consider adding a description field for each fault category to provide more context to users.

4.User Input Validation:

-Include more robust input validation to handle unexpected user inputs.


-Provide informative error messages to guide users on valid inputs.

5.User Interaction:

-Implement a more user-friendly interface with clear instructions and prompts.


-Consider incorporating graphical elements or a GUI for a more intuitive user experience.

6. Improvements and Future Development:

-Integrate a database to store user information and fault records for better scalability.
-Implement a feature for users to view their fine history and payment status.

7.Error Handling:

-Enhance error handling by providing specific error messages for different scenarios.
-Implement a system to temporarily lock accounts after multiple failed login attempts to prevent brute force attacks.

30
9.0 CONCLUSION

The UiTM fine system source code demonstrates a functional approach to categorizing and managing student faults
related to self-appearance, hostel, and vehicles. While the code provides a foundation for a fine system, several
areas can be enhanced, such as security measures, user interaction, and error handling. Integrating encryption,
improving the user interface, and implementing a database for data storage are recommended for a more robust
system.

31

You might also like