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.

assignment No. 03 of CS304 has been uploaded today (Jan 08, 2016). You are required to download assignment file from VULMS and upload your solutions within due date Jan 14, 2016

Assignment No. 03
Semester: Fall  2015
Object Oriented Programming – CS304

 

Total Marks: 20

 

Due Date: 14 Jan, 2016

 

Objectives:

To get a hands on experience in implementing class level association in Object oriented Programming

Instructions:

Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:

 

  • The assignment is submitted after due date.
  • The assignment is submitted via email.
  • The assignment is copied from Internet or from any other student.
  • The submitted assignment does not open or file is corrupt.
  • It is in some format other than .cpp (Code File).

 

Note: All types of plagiarism are strictly prohibited.

 

For any query about the assignment, contact at CS304@vu.edu.pk

 

 

 

Class Diagram

 

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

Attribute:

vehicleNo: string

color: string

Methods/Operations/Getters/Setters:

getVehicleNo(): string

getColor(): string

2. Class Car:

distance: int

Methods/Operations/Getters/Setters:

setDistance(int): void

calculateFare(int): int

displayInformation(): void

 

Important points:

  • Your program should be able to create a Car object having a number, color and distance without creating an explicit object of Vehicle class.
  • All Vehicle attributes should be directly accessible to Car and should not be accessible publically.
  • Your program should accept value of distance only between 1-500 kilometers; any other value should be treated as invalid value.
  • At the end, information about Car (car number, car color, distance covered) and total fare should be displayed whereas calculateFare(int) is a utility function. Fare is 5 rupees/kilometer.

 

 

 

 

Output:

BEST OF LUCK

 

+ 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: 2585

.

+ 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)

Replies to This Discussion

Asslam

plz do the discussion

This is awesome! Thanks for sharing

most welcome

plz give more solutions

ye lo mze kro

Attachments:

salam plz check 304 assignment 3 solution 

Attachments:

RSS

Latest Activity

ALEENA liked + IUUOƆƎUT +'s discussion کہو تو لوٹ جاتے ہیں ۔ ۔ ۔
2 minutes ago
ALEENA replied to + IUUOƆƎUT +'s discussion How Can You Get Secured of Being Banned On Ning
10 minutes ago
ayesha added 4 discussions to the group CS614 Data Warehousing
11 minutes ago
ALEENA liked + IUUOƆƎUT +'s discussion How Can You Get Secured of Being Banned On Ning
12 minutes ago
Aisha RD replied to + M.Tariq Malik's discussion EDU601 Philosophy of Education Assignment No 01 Fall 2019 Solution & Discussion in the group EDU601 Philosophy of Education
15 minutes ago
Aisha RD joined + M.Tariq Malik's group
15 minutes ago
RAjpoot* updated their profile
32 minutes ago
+ ! ! ! ! ! ! ! ! ! AG replied to + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion Happy Birth Day Zargiyah (Tasha <3)
45 minutes ago
+ Danial liked + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion Happy Birth Day Zargiyah (Tasha <3)
51 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Muhammad Younas Rajpoot's discussion ECO404 assignment 1 fall semester dated 19-11-2019
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked waqas ahmad's discussion isl 201
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked zobialatif's discussion hazrat ali says
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + IUUOƆƎUT +'s discussion Kabhi aye haqeeqat e muntizir
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Abdul Majid Jamil's discussion for assignment of zoogy on topic wildlife counting
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Azhar Sagar's discussion How to make srs Software Requirements Specification
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Moji's discussion MCM301 assignment no 1
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Aijaz khan's discussion CS608 - Software Verification and Validation Assignment No. 2 Need Solution
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked 彡JK彡 ❤️'s discussion If you have sOmething stupid to saY............
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked zohaib iftikhar's discussion ...* NASEEB TAK RASAI ...*
52 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked 彡JK彡 ❤️'s discussion Don't Look for Perfection........ LOVE lies in imperfection
52 minutes ago

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

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