QandA_2023
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){ this.id = id; this.name = 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; this.name = 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:
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:
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?