COMPSCI 2S03 Lecture Notes - Lecture 16: Aqua Teen Hunger Force (Season 2), Class Diagram

41 views2 pages

Document Summary

Enum (a special type of class in java): Enums contain constant objects (not strings) enum weekday { It creates an instance of the enum mealtime. Constructor name must be the same as the class name. Association - semantic dependency, weak relationship but unrelated (e. g. a doctor and a patient) Inheritance - simple class and other classes (e. g. animal and cat) Aggregation/composition - part of or composed of (e. g. engine is part of car, but the car contains other parts too) These relationships can be representing using a class diagram. Meantime(int tt, int mm) { private time servingtime; servingtime = new time(tt, mm); Static variables are independent of objects. e. g. non static example: Math. pow(2,4) 16 8 void addb(int[] x, int y);

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents