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


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

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: 12005

.

+ 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

discussion..

working on it, will share soon

Okz....

jaldi Karo :) Rafey Bhai :P :D

is me jo class diagram di hui h wo first assignment wali h 

working :)

kb hogi

samaj mei nae aa raha

good keep working on it .............

mujhy bi chay cs304 assignment

guys i am stucked on a module wher we pass passenger class object , what to do with this module? :(

reserveseats wala 

lagta h admins ko b solution samaj nahi arha

RSS

Latest Activity

Moureen Max left a comment for fabiha
7 minutes ago
Moureen Max left a comment for Maya
7 minutes ago
Moureen Max left a comment for zafar iqbal
8 minutes ago
Moureen Max left a comment for sannia satti
8 minutes ago
Moureen Max left a comment for Hina
8 minutes ago
Moureen Max left a comment for Hira Aslam
9 minutes ago
Moureen Max left a comment for Ayesha
9 minutes ago
Moureen Max left a comment for Muhammad Adeel Anjum
13 minutes ago
Moureen Max left a comment for zeeshan ali
14 minutes ago
Moureen Max left a comment for hafeez
14 minutes ago
Moureen Max left a comment for Muhammad Shehram
14 minutes ago
Moureen Max left a comment for Habib Bhabha
14 minutes ago

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

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

.