We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

CS304 Assignment No 2 (Last Date Dec 10)

Problem Statement:

Keeping in view the above class diagram, you have to write code for the below mentioned classes and show their relationship with each other:

 

1. Class Bus:

Attribute:

BusNo:string

SeatingCapacity:int

SeatsReservedSofar:int

 

Methods/Operations/Getters/Setters:

GetSeatingCapacity():int

SetSeatingCapacity(bCap:int)

GetBusNo():string

SetBusNo(bNo:string)

ReserveSeat(p:Passenger)

DisplayInfo()

 

2. Class passenger:

 

Attribute:

Name:string

Gender:char

 

Methods/Operations/Getters/Setters:

SetPassengerName(name:string)

GetPassengerName():string

SetGender(gender:char)

GetGender():char

 

Hint: You have to implement the relationship of aggregation between class “bus” and “passenger” through C++ code.

  • Your program should allow the user to enter information of bus while creating and information of passenger while adding a passenger in bus.
  • It should give option (yes/no) to add more passenger if capacity of bus allows.
  • After adding the last passenger (i.e. when adding a passenger makes buss full) or “No” is selected as option, it should display the complete summary about bus and all passenger in bus as shown in output below. 

 

Output:

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 11947

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

plz someone upload sol in c++ format

This is the correct solution friends...

But It was pretty tough

I just submitted my assignment now

Almost all of the students have submitted their assignments.

Attachments:

RSS

Latest Activity

Farhan Amin replied to Farhan Amin's discussion your vu email address will deleted
6 minutes ago
Farhan Amin replied to Farhan Amin's discussion your vu email address will deleted
7 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi liked + M.Tariq Malik's discussion CS201 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019
18 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi replied to + M.Tariq Malik's discussion MGT211 GDB Fall 2019 Solution & Discussion in the group MGT211 Introduction To Business
19 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi joined + M.Tariq Malik's group
19 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi liked + M.Tariq Malik's discussion MGT211 GDB Fall 2019 Solution & Discussion
23 minutes ago
+ Abb@s replied to Farhan Amin's discussion your vu email address will deleted
39 minutes ago
+ Danial replied to Farhan Amin's discussion your vu email address will deleted
1 hour ago
Shine--Ex-VUStudent liked + "J ɨ y ą ⋆'s discussion meliiiiiiii dailyyyyyyyyyyyyyyyyy milkkkkkkkkkkkkkkkkk :(
1 hour ago
+ Danial replied to Farhan Amin's discussion your vu email address will deleted
1 hour ago
Shine--Ex-VUStudent liked +"Certified Gangster"++'s discussion New invention of Microsoft
1 hour ago
Moji posted a discussion
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MGT211 GDB Fall 2019 Solution & Discussion in the group MGT211 Introduction To Business
1 hour ago
Muhammad Usman Shahzad replied to + M.Tariq Malik's discussion CS601 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group CS601 Data Communication
1 hour ago
Muhammad Usman Shahzad joined + M.Tariq Malik's group
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to sayyad saqib hussain shah's discussion HRM 626 HANDOUTS REQUIRED PLS
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to Farhan Amin's discussion your vu email address will deleted
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MTH302 Business Mathematics & Statistics Assignment No 01 Fall 2019 Solution & Discussion in the group MTH302 Business Mathematics & Statistics
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MTH302 Business Mathematics & Statistics Assignment No 01 Fall 2019 Solution & Discussion in the group MTH302 Business Mathematics & Statistics
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MTH302 Business Mathematics & Statistics Assignment No 01 Fall 2019 Solution & Discussion in the group MTH302 Business Mathematics & Statistics
2 hours ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service