Sunteți pe pagina 1din 10

COMSATS UNIVERSITY, ISLAMABAD

Title: Embedded System


Subject: ICT
Final Project Report

Submitted to: ASHFAQ HUSSAIN FAROOQI

Submitted by: Muhammad Umair & Muhammad Nawaz

Registration#: SP19-BSE-088 & SP19_BSE_0


3rd JULY, 2019

Department of Computer Science,

Islamabad Campus
Description:

1. Story:
In Cricket Player Management, we work with three modules. One of the modules is in
list and other two in dictionary. Team management is the first module which is the
dictionary. In which we would add the team and enter his ID, name and owner’s name. In
this module we will also view the team’s information, edit team’s information by its ID,
search team by its ID and delete team by its ID. We delete, search and edit one team at a
time. When we enter invalid id to edit team then it display message “id not found” and enter
again until user enter invalid id it display above message. The second module is Player
Management which is also in dictionary. In which we would add player and enter his ID,
name, category and player’s age. In this module we will also view the player’s information,
edit player’s information by his ID, search player by his ID and delete player by his ID. We
delete, search and edit one player at a time. In this final semester project we added multiple
team and player. Third module is Player Selection which is in list. In which we add player in
team from other two modules (team management and player management). If player or team
is not added then we does not add player in team. In this whole project we use function. We
define function main function in which we call other function and these other function also
call in menu function. In this ways we use functions. We do exceptional handling as well in
our project at input.

2. Modules:
 Team Management
 Player Management
 Player Selection
 Main

1. Team Management:

1. Entity:
Team Management has team entity.

2. Function’s Name:
This is define in a function. In this function there are six more function are used.
 Add Team Record
 View Team Record
 Edit Team Record
 Search Team Record
 Delete Team Record
 Menu1

3. Explanation:

 Add Team Record:


In this function, we used if-else loop to add information about teams. If team is
already available in the record of team management dictionary then it will inform
the user and ask him to another team.
 View Team Record:
In this function, we used for loop to view the record of the teams added by the
user in previous function and if-else loop to check if team-record is empty or not.
 Edit Team Record:
In this function, we used if-else loop to edit the information of the teams which
was added before and another if-else was used to check if team-record is empty or
not.
 Search Team Record:
In this function, we used if-else loop to search the information of the teams and
another if-else loop was used to check if team record is empty or not.
 Delete Team Record:
In this function, an if-else statement was used to delete the added record of the
teams and another if-else statement was to check if team record is empty or not.
 Menu1:
This function works as menu to call the functions and for this we used while loop
and if-else loop.

2. Player Management:

1. Entity:
Player Management has player entity.

2. Function’s Name:
This is define in a function. In this function there are six more function are used.
 Add Player Record
 View Player Record
 Edit Player Record
 Search Player Record
 Delete Player Record
 Menu2
3. Explanation:
 Add Player Record:
In this function, we used if-else loop to add information about players. If player is
already available in the record of player management dictionary then it will
inform the user and ask him to another player.
 View Player Record:
In this function, we used for loop to view the record of the players added by the
user in previous function and if-else loop to check if player-record is empty or
not.
 Edit Player Record:
In this function, we used if-else loop to edit the information of the players which
was added before and another if-else was used to check if player-record is empty
or not.
 Search Player Record:
In this function, we used if-else loop to search the information of the player and
another if-else loop was used to check if player record is empty or not.
 Delete Player Record:
In this function, an if-else statement was used to delete the added record of the
player and another if-else statement was to check if player record is empty or not.
 Menu2:
This function works as menu to call the functions and for this we used while loop
and if-else loop.

3. Player Selection:

1. Entity:
Player Selection has no entity or team and player entity.
2. Function’s Name:
This is also define in function. In this function there are three more function are used.
 Add Player
 View Player
 Menu3
3. Explanation:

 Add Player:

In this function, we used if else to add player in team. If player and team are not added
then it inform user that this team and player are not added and if one player is already
added in one team then same player does not add in other team.

 View Player:
In this function, we used for loop to view the record of the players and teams in
which players are added by the user in previous function and if-else loop to check
if record is empty or not.
 Menu3:
This function works as menu to call the functions and for this we used while loop
and if-else loop.

4. Main:
This function works as menu to call the functions and to terminate the program. For this we
used while loop and if-else loop.

1. Team Management:
In this function we define five more function.
 Add Team Record:

Explanation:
First is add _team _record function. In which user added team by using unique id, team’s
name and team’s owner name. For team id user must use integers otherwise a message
i.e. enter valid id will be displayed to the user.
 View Team Record:

Explanation:
Second is a view _team _record function. In which view all record that you are added.
First user select from menu1 to view record. Record is view as in above figure. When
there is no record added then a message i.e. empty record will be displayed to the user.

 Edit Tem Record:

Explanation:
Third is edit _team _record function. In which user edits team record by using team id. If
team id found in TM then it’s record can be edited otherwise a message i.e. id not found
will be displayed to the user. User re-enters team’s name and owner’s name.

 Search Team Record:

Explanation:
Fourth is search _team _record function. User can use this function to search any team by
using team id. If team id found in TM then it will search the record and view only that
record and if not then it display message that ” id not found”.

 Delete Team Record:

Explanation:
Fifth is delete _team _record function. In which user delete the entire team by using team
id. If team id is found in TM then it will delete the record otherwise it displays message
that “id not found”.

When user press 6 then it display main menu.

1. Player Management:
In this function there are five more function are used.

 Add Player record:


Explanation:
First is add_ player_ record function. In which a player can be added by using player id,
player name, and player category and player age. When user enter player id in characters
(alphabets) it display message to enter valid id.

 View player record:

Explanation:
Second is view _player _record function which view all record that you are added. First
user select from menu2 to view record. Record is view as in above figure. When user add
no record and want to view then it display message that “empty record.”

 Edit Player Record:

Explanation:
Third is edit _player _record function. In which user can edit player information by using
player id. If player id is found in PD then it will be edit its record otherwise it displays a
message “id not found”..
 Search Player Record:

Explanation:
Fourth is search _player _record function. In which user can search player information by
using player id. If player id found in PD then it will search the record and view only that
record otherwise it displays a message that “id not found”.

 Delete Player Record:

Explanation:
Fifth is delete _player _record function. In which user can delete the player record by
using player id. If player id found in PD then it will delete the record otherwise it displays
a message that” id not found”.

When user enter 6 a main menu will be displayed

2. Player selection:

 Add Player:

Explanation:
First is add_ player function. In this function user enter team id if this team id is not in
TM then it display message that “this team is not added” if this team is in TM then user
enter player id if this player id not in PD then it display message that “this player is not
added” if this player in PD then user enter price of player. In this way we add player in
team.

 View Player:

Explanation:
Second is view_ player function. In which view all record that user added. First user
select from menu3 to view record. Record is view as in above figure. When user add no
record and want to view then it display message that “empty record.”

S-ar putea să vă placă și