Look, Read, Understand, Apply


OOAD - Object Oriented Analysis and Design


Difference between class diagram and object diagram

Class diagram shows concepts/classes and their relationships with each other of the system. Attributes of class are common to all object, generally they don't have values.
Object diagram shows objects (instances of classes) with other objects of the system. Each object will have values for the attributes.

Difference between OOA and OOD.

Object Oriented Analysis (OOA) is study of system to figure out functions of system, requirements of users of the system. users of the system. This study figure out if system is feasible to build or not.
Object Oriented Design (OOD) is about designing system, answering the questions raised in analysis phase to come up with solutions to the problems. This phase focuses on "how" rather than "what". How to design appropriate solution to the what questions raised in the analysis phase.

Make class Diagram and write code for given statement: students borrow books.

Here, we have two concepts (classes): students and books, these two concepts are associated with borrow action. So, we have to make three Java classes; for students, books and for action borrow.

        class students{
            int id; 
            String name;
            public void set(int id, String name){
       = id;
       = name;
            public String getName(){return name;}
            public void show(){
                System.out.println("Id: "+id+"\nName: "+name);

        class books{
            int isbn;
            String name;
            public void set(int isbn, String name){
                this.isbn = isbn;
       = name;
            public void show(){
                System.out.println("Isbn: "+isbn+"\nName: "+name);
            public String getName(){return name;}

        class borrow{
            students s;
            books b; 
            public void setBorrow(students s1,books b1){
                s = s1;
                b = b1; 
            public void showBorrow(){
                System.out.println("Student name: "+s.getName()+"\nBook name: "+b.getName());

Categorize requirements:

Requirements can be categories as: Functional,Usability,Reliability, Performance,Secure

Use case formats:

Three use case formats are defined:

  • Fully Dressed: showing all the details like pre-conditions, actors, post-conditions, name of use case, glossary etc. of the use case
  • Brief

How will you decide if a use case is useful or not?

Three tests can be performed to see usefulness of a use case, they are:

  • Boss Test: is use case providing or performing any valuable thing
  • Business Process test: is use case represents any business process of a system? Then it is valuable.
  • length of use case: Short use cases are generally of no value. It should represent some concrete tasks of system.

What happens in Inception Phase?

It finds if project is worth more serious investigation or not. A small workshop is conducted to figure out requirements, actors, goals of those requirements are figured out, use cases are named; 10 - 20% of use cases are written in fully dressed format. Risks are found out.

What happens in elaboration phase?

The major risking use cases are programmed, tested; most of the use cases are discovered and detailed, risks are addressed. A serious investigation of the system under development is done.

what are domain models?

Domain model shows the major concepts of a domain under study; acts as a source of inspiration for designing and developing software objects, becomes input to several artifacts of use cases. A domain model is a visual representation of real situation objects in a domain. Domain models are also known as conceptual models.
Domain models and data models are not same. Data models are more related to persistent data stored somewhere (database).
Domain model is created to reduce representational gap between human's mental model and software models.

How is domain model created?

  • Find conceptual classes
  • Draw class diagram using those conceputal classes
  • Add attributes to classes and associated classes.