CS212: Object Oriented Analysis and Design Lecture 24: Introduction to STL.
CS212: Object Oriented Analysis and Design Lecture 1: Introduction.
-
Upload
scarlett-watkins -
Category
Documents
-
view
215 -
download
2
Transcript of CS212: Object Oriented Analysis and Design Lecture 1: Introduction.
![Page 1: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/1.jpg)
CS212: Object Oriented Analysis and Design
Lecture 1: Introduction
![Page 2: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/2.jpg)
AnalysisObject-oriented
and
Design
Analysis emphasizes an investigation of the problem and requirements, rather than a solution.
Design emphasizes a conceptual solution that fulfils the requirements, rather than its implementation.
Do the right thing
Do the thing right
![Page 3: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/3.jpg)
What is OOAD?
Object-oriented analysis emphasises on finding and describing the objects—or concepts—in the problem domain.
Object-oriented design emphasises on defining software objects and how they collaborate to fulfil the requirements.
![Page 4: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/4.jpg)
Example: Library management system
Domain Concepts
Book
title
Visualization of
Domain Concepts
Public class Book{private String title;public Chapter getChapter (int){…}
}
Representation in an object oriented programming
language
![Page 5: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/5.jpg)
Course Layout
OOAD
C++
UML
DP
SE
![Page 6: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/6.jpg)
Introduction to OOAD (CS212)
• Repeatable solution to a commonly occurring problem
• Design and development of software
• Modeling Language to visualize design of a system
• Object Oriented Programming
C++
UML
DPSE
![Page 7: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/7.jpg)
Course structureO
OA
D Theory
OO Concepts
Design Patterns
OO Modeling
Laboratory C++
![Page 8: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/8.jpg)
Marks distribution
Theory
• Class participation: 5
• Mid semester 1: 15
• Mid semester 2: 20
• End semester: 60
Lab
•Each lab: 15
•Mid semester Practical: 20
•End semester Practical: 30
![Page 9: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/9.jpg)
Lecture Plan
Mid sem 1
Class and Object Overloading Inheritance
Mid sem 2
Virtual Function and Polymorphism
Exception handling Template
End sem STL UML Design Patterns
![Page 10: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/10.jpg)
About Lab sessions• C++ programming assignments
• Thursday – 1 PM to 3 PM - B14CS001 to B14SS017
• Friday – 1 PM to 3 PM - UG201213002 to UG201313039
• Venue: Computer centre
• 10 programming assignments, 1 mid-semester practical, 1
end-semester practical
![Page 11: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/11.jpg)
Evaluation criteria for the lab
•Format - 2
•Documentation - 2
•Response - 4
•Design - 3
•Execution - 4
![Page 12: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/12.jpg)
Procedural vs. Object-Oriented
Line of codeLine of codeLine of code
Data is stored independent of application
Each object is independent of the others
OO-applicationProcedural application
DATA
![Page 13: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/13.jpg)
Main OO Concepts
Encapsulation Abstraction
Inheritance Polimorphism
OO Concepts
![Page 14: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/14.jpg)
Encapsulation• Each objects methods manage it’s own attributes.
• This is also known as information hiding.
• An object A can learn about the values of attributes of another object B, only by invoking the corresponding method associated to the object B.
• Example: • Class: Student• Attributes: Name, roll number• Methods: getName(), setRollNumber()
![Page 15: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/15.jpg)
Abstraction
• A problem solving tool that allows one to think of a problem at a higher level without worrying about the details.
• Provides only essential information to the outside world and hides their background details,
• To represent the needed information in program without presenting the details.
• For example, a clock shows the time to the user, without telling how it is internally stored.
![Page 16: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/16.jpg)
Abstraction vs. Encapsulation
Every entity that performs abstraction is encapsulated internally but every thing that shows encapsulation need not be abstraction always.
![Page 17: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/17.jpg)
Classes
• Classes are templates that have methods and attribute names and type information packaged in a single unit
• Objects are generated by these classes and they actually contain values.
• We design an application at the class level.
• During execution objects are created by classes as they are needed to contain state information.
• Objects are removed when not needed.
![Page 18: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/18.jpg)
Class & Objects
Name
Number
CLASS: Furniture
methods: ExampleChangeNumber
Objects:
Desk
123445
ChairA
32143
ChairB
45687
![Page 19: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/19.jpg)
Class Hierarchies & Inheritance
• Classes can be arranged in hierarchies so that more classes inherit attributes and methods from more abstract clases
• Class hierarchy diagrams
Class: Chair
subclasses
Chair Type A Chair Type B
![Page 20: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/20.jpg)
Polimorphism
• One method will behave differently when it is applied to the
objects of different classes
• Different methods associated with different classes can
interpret the same message in different ways.
• Example: an object can send a message PRINT to several
objects, and each one will use it’s own PRINT method to
execute the message.
• E.g. Overloading
![Page 21: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/21.jpg)
Unified Process
• Inception— approximate vision, business case, scope, vague
estimates.
• Elaboration— refined vision, iterative implementation of the
core architecture, resolution of high risks, identification of most
requirements and scope, more realistic estimates.
• Construction— iterative implementation of the remaining
lower risk and easier elements, and preparation for deployment.
• Transition— beta tests, deployment.
![Page 22: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/22.jpg)
Schedule-oriented terms in the Unified Process
Inception Elaboration Construction Transition
Iteration Phase
Milestone ReleaseFinal Product
![Page 23: CS212: Object Oriented Analysis and Design Lecture 1: Introduction.](https://reader034.fdocuments.in/reader034/viewer/2022051619/56649e4e5503460f94b45311/html5/thumbnails/23.jpg)
Thank youNext Lecture: Quick Programming Recap