1 / 17

CS 4233: Object Oriented Analysis and Design

CS 4233: Object Oriented Analysis and Design. 9-Jan-2003 Lecture 1. Outline. Previous Business none Course Introduction Mini-design Example. Course Introduction. CS 4233: Object-oriented Analysis & Design Prof. Heineman ( heineman@cs ), FL 137 Office hours Tuesday 10:00 – 11:00 AM

charo
Télécharger la présentation

CS 4233: Object Oriented Analysis and Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 4233: Object Oriented Analysis and Design 9-Jan-2003 Lecture 1

  2. Outline • Previous Business • none • Course Introduction • Mini-design Example Lecture 1

  3. Course Introduction • CS 4233: Object-oriented Analysis & Design • Prof. Heineman (heineman@cs), FL 137 • Office hours • Tuesday 10:00 – 11:00 AM • Thursday 5:00 – 6:00 PM • my.wpi.edu web site available Lecture 1

  4. Course Structure • Core of five design assignments (50%) • Midterm exam, Friday January 31st (20%) • Final exam, Thursday February 27th (20%) • Class participation (10%) • as evidenced by questions/answers in class, visits to office hours, communication on my.wpi.edu Lecture 1

  5. Course Goals • Understand, develop, and critique UML models • Utilize use cases to identify and describe requirements and specifications of a software system • Generate a detailed design document for a software system • Understand the use of design patterns within complex designs • Describe and illustrate the use of design patterns Lecture 1

  6. Course Focus • Lay a foundation for OO design • too much OO programming is done without first focusing on the design • Educate in best practices of OO design • hands-on experience • Challenge you • Seven weeks of thinking design Lecture 1

  7. Basic Terms (from TAOO) Object – an abstraction of a physical entity or conceptual thing Class – the abstract descriptorof a set of object instances How are classes defined? Through analysis. ClassData Operations Lecture 1

  8. OO Requirements Analysis (RA) • Identify objects that are necessary for the context of a desired software application • Typically precedes OO Design (OOD) • OORA specifies externally visible characteristics of a system • OOD specifies internal structure of system Lecture 1

  9. Design Example • Client makes the following request: I want to keep a linked list of the books in my collection. There are several categories of books, including Science Fiction, Fantasy, Fiction, NonFiction, Literature, and Reference. I frequently buy and sell books, and need monthly reports of my collection broken down by category. Lecture 1

  10. Requirements Analysis <<identify nouns>> I want to keep a linked list of the books in my collection. There are several categories of books, including Science Fiction, Fantasy, Fiction, NonFiction, Literature, and Reference. I frequently buy and sell books, and need monthly reports of my collection broken down by category. Lecture 1

  11. Booktitle : Stringauthor: StringisFantasy : BooleanisLiterature: BooleannextFantasy : BooknextLiterature : Book… Analysis Model V0 • Critique RoadMap • Summarize the design • Identify the design decisions • Explain correct decisions • Critique flawed decisions 1 nextFantasy Book nextLiterature 1 Lecture 1

  12. CollectionfantasyBooks : BookliteratureBooks : BooknonFictionBooks : Book… Booktitle : Stringauthor: Stringnext: Book… Analysis Model V1 Collection Book 1 * Lecture 1

  13. Collectioncategories : Category[*]… addCategory (Category c) Category getCategory(s) Categorytype : Stringbooks : Book… addBook (b) Booktitle : Stringauthor: Stringnext: Book… Analysis Model V2 Collection Category Book 1 * 1 * Lecture 1

  14. Why doesn’t the JDK have… • Some Basic classes? • Person • User • Book • Why do its classes seem ‘too much’ • Currency (JDK 1.4 only) • Collection [not a class but an interface] • String [11 constructors (2 deprecated), 55 methods (1 deprecated)] Lecture 1

  15. public String toLowerCase(Locale locale) { int len = count; int off = offset; char[] val = value; int firstUpper; /* Now check if there are any characters that need to be changed. */ scan: { for (firstUpper = 0 ; firstUpper < len ; firstUpper++) { char c = value[off+firstUpper]; if (c != Character.toLowerCase(c)) {break scan;} } return this; } char[] result = new char[count]; /* Just copy the first few lowerCase characters. */ System.arraycopy(val, off, result, 0, firstUpper); if (locale.getLanguage().equals("tr")) { // special loop for Turkey for (int i = firstUpper; i < len; ++i) { char ch = val[off+i]; if (ch == 'I') { result[i] = '\u0131'; // dotless small i continue; } if (ch == '\u0130') { // dotted I result[i] = 'i'; // dotted i continue; } result[i] = Character.toLowerCase(ch); } } else { // normal, fast loop for (int i = firstUpper; i < len; ++i) { result[i] = Character.toLowerCase(val[off+i]); } } return new String(0, result.length, result); } Lecture 1

  16. Friday Assignments • Read TAOO: Chapter 1 • Complete Constructor Challenge Quiz • Do exercise 1-2 Lecture 1

  17. References • JDK online documentation. • Currency • IMF special Basket, Lecture 1

More Related