1130tutorial4

1130tutorial4 - CSC1130 Introduction to Computer...

Info iconThis preview shows pages 1–17. Sign up to view the full content.

View Full Document Right Arrow Icon
    1 CSC1130 Introduction to Computer Programming Tutorial Notes 4
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
    2 More on UML Class Diagram Associations Static general relationships between classes  Cardinality
Background image of page 2
    3 More on UML Class Diagram Aggregation Strong form of association Denotes whole/part  relationship CD Player CD 1 0..* Speaker 1 1
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
    4 More on UML Class Diagram Composition Strong form of aggregation The lifecycle of the part is dependent on that of the whole. Human Lung Brain Heart 1 2 1 1 1 1
Background image of page 4
    5 More on UML Class Diagram Generalization Inheritance or an "is a" relationship  Animal Dog Human
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
    6 Assignment 3 Assignment 3 is released!! Release Date: September 24, 2007. Due Date: 12:00nn, October 8, 2007.
Background image of page 6
    7 Aim of Assignment 3 Manipulate numerical variables Familiarize you with the writing of a  complete   class. Familiarize you with the interactions among  classes.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
    8 Planetarium You have to implement a program simulating the  movements of astronomical objects in the outer  space.
Background image of page 8
    9 Planetarium – Display Window Control  buttons Time  display Focus Panel showing  movements of  astronomical  objects
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
    10 Planetarium – Control Buttons Pause Fast forward Rotate upward Rotate downward Zoom in Zoom out
Background image of page 10
    11 Planetarium – Focus Focus on  Mars
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
    12 Planetarium - Classes There are total 8 classes in this assignment Vector3D GravitationalField Star Planet Satellite PlanetarySystem PlanetariumGUI PlanetariumMain These five classes are to be written by you Easy Difficult
Background image of page 12
    13 Planetarium – Vector3D Vector3D Represents a vector in 3D space x y z v ) , , ( z y x v =
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
    14 Vector Operations Given two vectors     Vector addition   Vector subtraction   v 1 v 2 v v v + v v 1 v - v ) , , ( 1 1 1 1 z y x v = ) , , ( 2 2 2 2 z y x v = ) , , ( 2 1 2 1 2 1 2 1 z z y y x x v v + + + = + ) , , ( 2 1 2 1 2 1 2 1 z z y y x x v v - - - = -
Background image of page 14
    15 Vector Operations Vector length   Vector (scalar) multiplication   Unit vector   3 v v v v v 2 2 2 z y x v + + = ) , , ( z y x v λ λ= 2 2 2 ) , , ( ˆ z y x z y x v v v + + = = v ^
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
    16 Gravitational Field Newton's Law of Universal Gravitation Every single point mass attracts every other point mass by a  force of magnitude m 1  and  m
Background image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 38

1130tutorial4 - CSC1130 Introduction to Computer...

This preview shows document pages 1 - 17. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online