Unit #2-04
Learning Outcome
At the end of this lesson, you will be able to:
understand UML, especially Class Diagrams
Review
review "Methods" & "Fields"
Lesson
read "Using OOP", Chapter 8, Computer Based Problem Solving
read "UML" & "Class Diagrams"
we will be focussing on just one (1) of the many types of diagrams, Class Diagrams (see below)
this diagram exists in Draw.io!
we will include method types and the types of parameters passed into methods
constructors are normally not included
Activity
draw class diagram for MrCoxallStack, using Draw.io
(see below for example)
Daily Assignment
create the Class Diagram for MrCoxallStack
continue to re-create the MrCoxallStack from last time:
make a peekItem():string method
it returns the top value BUT does not remove it from the stack
make a clearStack() method
removes everything from the stack
Extra
do the above in a second language