0% found this document useful (0 votes)
16 views3 pages

Assignment 6

Uploaded by

bsce23017
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)
16 views3 pages

Assignment 6

Uploaded by

bsce23017
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/ 3

CE101T – Object Oriented Programming

Section: Assignment # 6 Total marks: 35


Name : __________________ Roll number : __________________

Submission:
• Email instructor or TA if there are any questions. You cannot look at others’ solutions or use others’
solutions, however, you can discuss it with each other. Plagiarism will be dealt with according to the
course policy.
• Submission after due time will not be accepted.

Follow this naming convention for your report, it should highlight difficulties you faced and things you
learned in this assignment. Naming Pattern ( Roll#_Assignment#.pdf e.g BSCE23000_Assignment3.pdf )
In this assignment you have to do following tasks:
Task 1: Ensure that you have installed all three softwares in your personal computer (Github, Cygwin
& CLion). Now, accept the assignment posted in Google Classroom and after accepting, clone the
repository to your computer. Make sure you have logged into the github app with your account.
Task 2: Open Cygwin app, Move to your code directory with following command “cd
<path_of_folder>”
<path_of_folder> can be automatically populated by dragging the folder and dropping it to the
cygwin window.
Run the code through Cygwin, use command “make run”, to get the output of the code
Task 3: Solve the given problems, write code using CLion or any other IDE.
Task 4: Keep your code in the respective git cloned folder.
Task 5: Commit and Push the changes through the Github App
Task 5: Write the code in separate files (structure_name.h, structure_name.cpp) for each struct, declare
struct variables, and call functions from main.cpp. Ensure that file names are in lowercase.
Task 6: Run ‘make run’ to run C++ code
Task 7: Run ‘make test’ to test the C++ code

Object Oriented Programming


CE101T-Spring 2024
Problem Statement: Group Collaboration and GitHub Branches

Task 1: Social Media Platform


Implement a User class that represents users in a social network. Each user has a
username(string), email(string), friend_count(int), and a list of friends(string array of fixed
static constant size). The class should allow users to make friends with other users, unfriend users,
and check if they are friends with another user.
Additionally, the class should override the << operator to allow printing the list of friends of a
user. The User class should provide the following functionalities:
Parameterized Constructor to initialize the username, email, and a friend_count.
Operator + to add a user as a friend.
Operator - to remove a user from the friend list.
Operator == to check if two users are friends.
Override << operator to print the list of friends of a user.
The program should demonstrate the functionalities by creating users (User user1, user2 etc),
making friends between users (user1+user2), printing the list of friends (cout<<user1),
unfriending users (user1-user2), and checking friendship status between users
(if(user1==user2)).

Task 2: Book Category Management System


Implement a Book class that represents books in a library. Each book has a title(string), an
author(string), category(string), category_count(int), and a categorylist(string array of fixed
static constant size). The class should allow users to add books of the same category, remove
books from different categories, and check if two books belong to the same category.
Additionally, the class should override the << operator to allow printing whether a book belongs
to any category or not. The Book class should provide the following functionalities:
Parameterized Constructor to initialize the title, author, category_count, and category of the
book.
Operator + to add a book of the same category.
Operator - to remove a book from a different category.

Object Oriented Programming


CE101T-Spring 2024
Operator == to check if two books belong to the same category.
Override << operator to print whether a book belongs to any category or not.
The program should demonstrate the functionalities by creating books (Book book1, book2 etc),
adding books of the same category by updating categorylist (book1+book2), printing whether a
book belongs to any category (cout<<book1), removing books from different categories (book1-
book2), and checking if two books belong to the same category (if(book1==book2)).

Task 3: Music Playlist Management System


Implement a Song class that represents songs in a music playlist. Each song has a title(string), an
artist(string), a type(string), type_count, and a playlist(string array of fixed static constant
size) it belongs to. The class should allow users to perform various operations related to managing
songs in the playlist.
Additionally, the class should override the << operator to allow printing whether a song belongs
to any type or not. The Song class should provide the following functionalities:
Parameterized Constructor to initialize the title, artist, type_count, and type of the song.
Operator + to add a song to the list of genres it belongs to.
Operator - to remove a song from a genre it belongs to.
Operator == to check if two songs belong to the same genre.
Override << operator to print whether a song belongs to any genre or not.
The program should demonstrate the functionalities by creating songs (Song song1, song2 etc)
and performing operations such as adding songs to playlist by updating playlist of both having
same type (song1+song2), printing whether a song belongs to any type (cout<<song1), removing
songs from playlist (song1-song2), and checking if two songs belong to the same type
(if(song1==song2)).

Object Oriented Programming


CE101T-Spring 2024

You might also like