Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

Assignment No. 01
SEMESTER Fall 2016
CS304- Object Oriented Programming

Total Marks: 20

Due Date:  10 /11/2016

 

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 .doc (MS Word Document).

 

Note: All types of plagiarism are strictly prohibited.

 

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

Objective

The objective of this assignment is:

  • To give you the practical implementation of Class Diagram

 

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

GOOD LUCK!

 

Marks: 20 

 

Problem Statement:

The galaxy is composed of the stars, satellite and planets etc.  In earth’s home galaxy, the solar system is comprised of sun (average star) and objects that orbits around it. Following are the 8 largest objects (planets):

1. Mercury

2. Venus

3. Earth

4. Mars

5. Jupiter

6. Saturn

7. Uranus

8. Neptune

The first four planets are called inner planets while the remaining four are outer planets. All planets revolve around the Sun and Satellites revolve around the planet.


 

The tasks you have to do are:

  1. Extract the main objects (entities) from the given scenario.
  2. Find the necessary attributes and functions that need to be associated with each object to implement the functionality mentioned above.
  3. Identify the relationships between these objects.
  4. Construct a final comprehensive Class diagram showing all objects and their relationships along with their attributes and functions.
  5. You have to use UML conventions to draw class diagram. The same has been followed in video lectures as well.

 

Note: You can use any drawing tool such as MS Visio, MS Paint or online drawing tool etc. but you have to paste your diagram in MS Word (.doc) file and submit this file on LMS. Images submitted as solution files will not be accepted.

 

Helping/External Links:

  1. 1.       http://solarviews.com/eng/solarsys.htm
  2. 2.      https://www.draw.io/         (Online Drawing Tool)

 

 

 

Lectures Covered:  This assignment covers Lecture #    1-6

Deadline:            Your assignment must be uploaded/submitted at or before November,10, 2016

 

 

                            

Views: 17729

Replies to This Discussion

+ AiM thanks for sharing 

Why we are using comet class?

Common attributes in super class: Name, distance and mass and functions will be getName() , getMass(), getDistance()........am i right?

By SMART

The galaxy is composed of the starssatellite and planets etc. In earth’s home galaxy, the solar system is comprised of sun (average star) and objects that orbits around it. Following are the 8 largest objects (planets):
1=MERCURY:
ATTRIBUETES OF MERCURY ARE:
Color of mercury is dark gray.
Temperature of mercury is 332 in degrees and in Fahrenheit is 167 degree Celsius.
size of mercury is 2,44okilometer.
2=FUNCTIONS OF MERCURY ARE:
Its rotation around sun is 87.97.
Diameter of mercury is 4,879km.
Radius of mercury is 2,440km.
2=VENIUS:
ATTRIBUETES OF VENIUS ARE:.
2) TEMPERATURE:
Temperature of venius is 864 in degrees and in Fahrenheit is 462 degree Celsius.
Size of venius is 6,052km.
Its distance from sun is 108.2 million km and distance from earth is 261 million km.
2=FUNCTIONS OF VENIUS ARE:
Its rotation around sun is 87.97.
Diameter of mercury is 4,834km.
Radius of venius is 6,052km.

3=EARTH:

ATTRIBUETES OF EARTH ARE:
Color of earth is blue.
Its shape is oblate spheroid.
Its distance from sun is 149.6 million km and distance from Centre of earth is 3,959miles.
2=FUNCTIONS OF EARTH ARE:
Its rotation of earth around sun is 92.96million miles.
Diameter of earth is 940miles kilometer.
Radius of earth is 149.60 million km.

4=MARS:

ATTRIBUETES OF MERCURY ARE:
3=size of mars is 3,390okilometer.
Its shape is oblate spheroid.
Its distance from sun is 225 million miles and distance from earth is 77 million km.
2=FUNCTIONS OF MARS ARE:
Its rotation around sun is 87.77.
Diameter of mercury is 8,879km.
Radius of mars is 9,440km.

5=JUPITER:

ATTRIBUETES OF JUPITER ARE:
3=size of Jupiter is 5,44okilometer.
Its shape is obligate spheroid.
Its distance from Jupiter is 563 million miles and distance from earth is 55 million km.
2=FUNCTIONS OF JUPITER ARE:
Its rotation around sun is 88.99.
Diameter of Jupiter is 9,879km.
Radius of Jupiter is 4,440km.

6=SATURN:

ATTRIBUETES OF SATURN ARE:
3=size of Saturn is 7,44okilometer.
Its shape is hexagonal.
Its distance from sun is 63 million miles and distance from earth is 97 million km.
2=FUNCTIONS OF SATURN ARE:
Its rotation around sun is 87.97.
Diameter of Saturn is 4,879km.
Radius of Saturn is 2,440km.
7=URANUS:

ATTRIBUETES OF URANUS ARE:
size of Uranus is 9,84okilometer.
Its shape is oval.
Its distance from sun is 55 million miles and distance from earth is 44 million km.
2=FUNCTIONS OF URANUS ARE:
Its rotation around sun is 98.34.
Diameter of Uranus is 8,879km.
Radius of Uranus is 2,440km.
8=NEPTUNE:

ATTRIBUETES OF NEPTUNE ARE:
size of Neptune is 89,44okilometer.
Its shape is oval.
4) DISTANCE:
Its distance from sun is 66 million miles and distance from earth is 33 million km.
2=FUNCTIONS OF NEPTUNE ARE:
Its rotation around sun is 99.77.
Diameter of Neptune is 98,879km.
Radius of Neptune is 4,440km.



plz share the final file
as im trying to solve scenario but a bit confused

You have to use UML conventions to draw class diagram. The same has been followed in video lectures as well.
what is this mean??? any one guide me please..UML conventions kia hy??

give me complete solution....... plz i am confuse

Planet
Pvt Char name;
Private float radius;
Private float mass;
int distance;
int moons;
public Planet();
public void setName();
getname();
setradius();
getradius();
setmass();
getmass();
setmoons();
getmoons();
setdistance();
getdistance();
revolve();


Stars class
Stars
Char name;
Int diameter;
Float radius;
Char gases[];
Setname();
Getname();
Setdiameter();
Getdiameter();
Setradius();
Setgases();
Getgases();
Shine();
Gasreaction();
Heat();

yh hai full solution

Attachments:

Thanks

RSS

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

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