Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Department of Computer Science

Islamia University Bahawalpur


Project Ideas and Requirements
Data Structures 3rd Evening B,C Project Submission(10 Points) Viva (5 Points)
Submission: Deadline 5/06/2024 8/6/24 & 9/6/ 24

Criteria for selection:


Select one of the projects in the list below. Each project has a unique ID for clarity. Students in a group
first need to list their roll numbers. Then, for each student in a group, divide their roll number by 3 and
record the remainder (0, 1, or 2). The student with the highest remainder in a group gets to choose a
project with the matching ID. For instance, if a group has three students with roll numbers(last four digits)
2021, 2014, and 2013, the remainder would be 2, 1, and 0 respectively. The student with roll number 2021
has the highest remainder so this group gets to pick Project having ID 2.

In the case of two members in the group, divide your number by 2 , if the student has reminder 1 in the
group then choose a project with ID 1 or ID 2 otherwise ID 0.

Note: Students are encouraged to come up with their idea/project in case you are not willing to select
any project in the list provided below.

Note : You have 4 weeks to complete this task so don’t waste time and start working today.

Project submission instructions

1. Upload the Report in pdf format on LMS , don’t wait for the last date, upload as soon as
possible
2. Place your project file on GitHub and mention link in the report at the bottom.
3. Share GitHub repository with your group members so your everyone in group can see
which part of the code is done by which student(Learn how to create the repository and
share it with teammates by yourself)
 Copying reports or projects from classmates, other
section’s students, or the internet will result in no credit.
Project report content:
1. (Description) Over all description what your project do in one paragraph
2. (Introduction)(why this application is required, which data structure you used, why
this is suitable for this problem, )
3. (Data Structure functions) list functions that are available in the data structure and
which you used in the project provide in a table.
4. test cases (Output screenshots)

Good luck 😊
1. Phone Directory Application (ID: 0)
Functional Requirements
 Data Model:
 The application shall store contact information including:
 Name (First and Last)
 Phone number(s) (mobile, home, work)
 Email address (optional)
 The application should allow for the definition of additional data fields based on
user needs (e.g., address, birthday).
 Data Management:
 Users shall be able to add new contacts to the directory.
 Users shall be able to edit existing contact information.
 Users shall be able to delete contacts from the directory.
 Search:
 The application shall allow users to search for contacts by name or phone number.
 The search functionality should be efficient, utilizing appropriate data structures for
fast retrieval.
 Search should support partial matches (e.g., searching for "Smith" should return all
contacts with "Smith" in their name).
 Display:
 The application shall display a list of all contacts or search results.
 Users shall be able to sort the contact list by different criteria (e.g., name, phone
number).
2. Stack Based text editor(ID: 1)

Functional Requirements:

 Data Store:
 Store data into any suitable data structure.
 Basic Editing:
 Users shall be able to enter text in the output.
 Users shall be able to navigate through the text using cursor movement controls
(next(),previous(),start(), end(),curr_position(3)).
 Users shall be able to insert and delete characters at the current cursor position.
 Undo/Redo Functionality (using Stacks):
 The application shall maintain a stack to track all editing operations (insertions,
deletions).
 Users shall be able to undo the most recent edit by popping the top element from
the stack and reverting the change.
 Users shall be able to redo an undone edit by pushing the previously popped
element back onto the stack and reapplying the change.
There should be a clear limit to the number of undo/redo operations supported (based on stack size).
3. Bill_Spliter(ID: 2)

Functional Requirements:
 Input:
o The application shall allow the user to enter the number of friends involved.
o For each dinner outing, the user shall be able to provide:
 Name of the person who paid the bill (payer).
 Name of the person who was treated (payee).
 Total amount of the bill.
 Balance Calculation:
o The application shall calculate the balance for each friend, considering:
 The payer pays the full amount of the bill.
 The payee splits the bill amount equally with all other friends (excluding the
payer).
 Output:
o The application shall display a final report for each friend, indicating:
 Friend's name.
 Amount the friend needs to collect from others (positive balance).
 Amount the friend needs to pay to others (negative balance).
 "No balance" if the friend owes or needs nothing from others.

Extra Information:

(Suitable Data Structure)

The most suitable data structure for this application is an unordered_map (also known as a hash
table in C++). Here's why:

 Key-Value Pairs: The application needs to store information about each friend and their
associated balance. An unordered_map is ideal for storing key-value pairs, where the friend's
name acts as the key and their balance is the value.
 Efficient Lookups: Unordered maps provide efficient average-case time complexity (O(1)) for
lookups, insertions, and deletions. This is crucial for quickly accessing and updating each friend's
balance based on their name.
 No Specific Order: The order in which friends are entered or displayed is not important in this
application. Unordered maps don't maintain a specific order for elements, which aligns well with
this requirement.
Here's a breakdown of how an unordered_map can be used in this application:
1. Key: The key in the unordered_map will be a string representing the friend's name.
2. Value: The value associated with the key will be a double representing the friend's current balance
(amount to collect - amount to pay).
This way, you can easily access and update the balance for each friend by using their name as the
key. The efficient lookup operations of the unordered_map allow for fast calculations and updates
during dinner outing entries.

You might also like