Object Oriented Programming and Design in Java
Session 3 Instructor: Bert Huang
Object Oriented Programming and Design in Java Session 3 - - PowerPoint PPT Presentation
Object Oriented Programming and Design in Java Session 3 Instructor: Bert Huang Announcements Next Monday's class canceled for Distinguished Lecture: Feb 1, 11 AM Davis Auditorium. Course survey due Homework 1 will be posted soon,
Session 3 Instructor: Bert Huang
Distinguished Lecture: Feb 1, 11 AM Davis Auditorium.
"officially" out Feb. 3rd
references, importing packages, exceptions, input, Arrays, ArrayLists, declaration keywords, code style
sequence diagram, state diagram
Analysis Design Implementation (common sense) (object-oriented) (actual programming)
be inadequate
considered a completed program
about design and implementation
your program to do
classes
in use cases. Then...
talk to user or other programs
in use cases
responsibilities, or
and responsibilities
relationships; we get more precise later
ClassName responsibility 1 responsibility 2 ... Collaborator 1 Collaborator 2 ...
responsibility?
for modeling software
than javadoc or actual code skeleton
established responsibilities
Class Name Attributes : Type Methods
needs the other
elements of the other class
instances
Class
Class doSomething()
changes over time
state changes
Type in all caps Type in lowercase hit caps lock hit caps lock
javadoc now
that like helps keep track of stuff I have to do. Or whatever. And it should sort by due date.
due date.
correct sorted position
including “laundry”
remaining items displayed
update, sort
TodoList, TodoFileManager
TodoItem Store name, date TodoList TodoPrompt Display list get commands TodoList TodoList Store list of items Sort items Add and remove TodoItem TodoPrompt TodoFileManager TodoFileManager Load list from file Save list to file TodoList
TodoItem Store name, date TodoList TodoPrompt Display list get commands TodoList TodoList Store list of items Sort items Add and remove TodoItem TodoPrompt TodoFileManager TodoFileManager Load list from file Save list to file TodoList
add/delete TodoItem
UML diagrams on last few slides