Object-Oriented Design Coursera Quiz Answers – Networking Funda

All Weeks Object-Oriented Design Coursera Quiz Answers

Object-Oriented Design Coursera Quiz Answers

Week 1: Introduction to Software Design and Architecture

Q1. Which of these are desirable characteristics of a software design? Choose the three correct answers.

  • tight coupling
  • flexible
  • reusability
  • maintainability

Q2. Identify two outcomes of the design process. Choose the two correct answers.

  • code implementation
  • design plan
  • conceptual design
  • technical design

Q3. You are writing out a CRC card for a bank machine component. Under which section should you put “Track Cash Remaining.”

  • Risk
  • Class
  • Collaborator
  • Responsibility

Q4. Which two of these are likely to be a part of conceptual design?

  • Mockups
  • Methods
  • CRC Cards
  • Abstract data types

Q5. When during the design process are you likely to produce CRC cards the most?

  • technical design
  • after releasing the software
  • customer meetings
  • conceptual design

Q6. Which of the following are examples of non-functional requirements? Choose the three correct answers.

  • purpose
  • security
  • performance
  • availability

Q7. Select the three categories of objects generally present in object-oriented software.

  • boundary
  • control
  • tool
  • entity

Q8. An object which is responsible for showing data to the user could be considered which category of object?

  • control
  • entity
  • boundary
  • representation

Q9. You are planning a Professor class as part of your software design. Which of these will you consider a collaborator ? Choose the two correct answers.

  • Course
  • Teach Course
  • Student
  • Track Employment Status

Q10. What is a requirement of this form called? “As a , I want to , so that __“.

  • entity abstraction
  • user story
  • conceptual mockup
  • key concept

Q11. You are a programmer creating software for a bank machine system. Which section of a CRC card for the bank machine component will the “User” go into?

  • Responsibility
  • Class
  • Collaborator
  • Object

Q12. During conceptual design, you will talk about… (Choose the three correct answers):

  • tradeoffs
  • technical diagrams
  • requirements
  • mockups

Week 2: Creating Models in Design

Q1. Some of the earliest computing languages supported:

  • abstract data types
  • main program and subroutines
  • objects and classes
  • local variables

Q2. What are some advantages of object-oriented programming in a language like Java? Choose the three correct answers.

  • abstract data types
  • computing efficiency
  • data management
  • mimic the real-world structure of the problem

Q3. Sam was asked to create a DeliveryDriver class. Sam thought about the problem, and reduced it to its most essential aspects… things like takeOrder, DeliveryArea, etc. She ignored things that were not important in the context, like the driver’s height or eye colour. She just applied an important object-oriented design principle. Which of these concepts best describes what she just did?

  • decomposition
  • generalization
  • encapsulation
  • abstraction

Q4. Sam identified the important attributes and behaviours of a delivery driver and put them all into a DeliveryDriver class, like “takeOrder”, “deliverOrder”, and “DeliveryArea.” She exposed some of these to other classes. She just demonstrated an important part of object-oriented design. Which of these concepts best describes what you did?

  • generalization
  • encapsulation
  • abstraction
  • decomposition

Q5. Sam decided that the DeliveryDriver class was getting too complex, so she split it up, moving its behaviour into several related classes, like DeliveryCar and DeliveryOrder. She just demonstrated which important object-oriented design principle?

  • decomposition
  • abstraction
  • encapsulation
  • generalization

Q6. Sam realized that her DeliveryDriver class had some behaviour and attributes that could be shared by other classes, like BusDriver and TaxiDriver, so she made a class called Driver that these classes inherited behaviour from. Which object-oriented design principle did she use?

  • abstraction
  • encapsulation
  • decomposition
  • generalization

Q7. Which keywords allow your classes to achieve polymorphism in Java? Choose the two correct answers.

  • extends
  • implements
  • interfaces
  • inherits

Q8. Which is the proper way to show inheritance in a UML class diagram? Choose one of the four options below:

  • a)
  • b)
  • c)
  • d)

Q9. Which is the proper way to show an abstract method in a UML class diagram?

  • #anOperation()
  • «anOperation()»
  • anOperation()
  • abstract anOperation()

Q10. Which UML class diagram is a good example of encapsulation? Choose one of the four options below:

  • a)
  • b)
  • c)
  • d)

Q11. Add the necessary keyword to complete this instance variable declaration in a class if you are using the encapsulation design principle to hide this variable from all other classes:

__ String message;

Enter answer here

Q12. There are three different relationships that objects can have. Which of these best describes the relationship between a Chair and its Legs?

  • association
  • aggregation
  • composition
  • formation

Week 3: Design Principles

Q1. Which of these terms are used to describe coupling? Choose the 3 correct answers.

  • ease
  • frequency
  • degree
  • flexibility
  • exposed

Q2. Which is the most desirable?

  • high cohesion, tight coupling
  • high cohesion, loose coupling
  • low cohesion, loose coupling
  • low cohesion, tight coupling

Q3. What are some keywords you might use for information hiding in Java? Select the three correct answers.

  • {none}
  • private
  • protected
  • abstract

Q4. What are the best ways to promote Conceptual Integrity in your software? Choose the two correct answers.

  • Good commenting
  • Delegating development of different components to different teams
  • Regular code reviews
  • Planning the architecture of the system

Q5. Information Hiding is closely related to one of the core design principles of object-oriented design. Which one?

  • generalization
  • decomposition
  • abstraction
  • encapsulation

Q6. Which of these sequence diagrams is correct?

  • a)
  • b)
  • c)
  • d)

Q7. What are elements of a state in a State diagram (see diagram)? Choose the three correct answers.

  • state name
  • state variables
  • events
  • activities
  • responsibilities

Q8. When is Model Checking conducted?

  • During development
  • After deployment
  • During planning
  • After development

Q9. What are the phases of Model Checking? Choose the 3 correct answers.

  • Analysis Phase
  • Modeling Phase.
  • Running Phase
  • Counterexample Phase
  • Model Simulation
  1. During model checking, what is the name for a violation of the desired properties of the model?
  • Model Gap
  • Redevelopment
  • Error
  • Counte rexample

Q11. When two processes cannot run because they are waiting on the same resource, it’s called…

  • State lock
  • Transition lock
  • Mutual lock
  • Deadlock

Q12. Choose the three examples of inheritance used poorly:

  • A method in the superclass is overwritten with different behaviour by a subclass.
  • A subclass inherits methods from the superclass and adds extra, new, unrelated functionality
  • Inheritance is used to share behaviour without specializing
  • The subclasses inherit methods from the superclass and have their own specific, related methods.

Week 4: Assignments

Q1. The first stage of the two-stage design process is _ design.

Hint: This stage has activities like creating CRC cards, talking with the customer about their requirements, and creating mockups.

Enter answer here

Q2. The second stage of the two-stage design process is __ design.

Hint: This is when you will define the structure of the code and start turning your mockups into classes.

Enter answer here

Q3. Which of these conceptual design techniques will help you analyze the problem space to determine classes for your object-oriented software? Choose the two correct answers.

  • tradeoffs
  • mockups
  • requirements
  • CRC

Q4. During conceptual design, once the problem is mapped into components, what are the other two critical pieces of information that you must specify for these classes or components? Choose the two correct answers.

  • methods
  • responsibilities
  • abstract data types
  • collaborators

Q5. You are writing the CRC card for a Bear component. Choose the two responsibilities.

  • camper
  • eat berries
  • hunger
  • den

Q6. You are writing the CRC card for a Bear component. Choose the three collaborators.

  • den
  • tree
  • bear
  • guitar
  • computer

Q7. You create an object that represents a user, storing important information about them such as their preferences. What kind of object is this?

  • entity
  • control
  • boundary
  • client

Q8. You create an object that represents a dialog box. It creates buttons and text fields, etc, for the user to interact with, and it logs those interactions. What kind of object is this?

  • boundary
  • control
  • entity
  • display
  • interaction

Q9. You create an object that compares values from two different sources. It then updates the smaller value to be equal to the larger one. What kind of object is this?

  • control
  • update
  • repository
  • entity

Q10. Which of these is an example of a quality tradeoff?

  • Not delivering key features so that deadlines can be met
  • Adding preferences that allow users to switch some features on and off
  • Limiting features knowing that they can be added later
  • Adding security knowing it will reduce speed

Q11. What is the term for reducing a class or object to its inputs and outputs in modelling?

  • pipe thinking
  • filter thinking
  • process thinking
  • black box thinking

Q12. Which one of these classes is in most need of being decomposed?

  • Book
  • Order
  • Student
  • Store

Q13. In order to provide good encapsulation, fill-in-the-blanks on this UML class diagram: (Replace the underscores _ from top to bottom with minus signs (“-“) or plus signs (“+”); your answer will be a string of six + or – signs with no spaces)

Enter answer here

Q14. You are writing a simple soccer video game. Select the best example of proper abstraction:

  • a)
  • b)
  • c)
  • d)

Q15. Which design principle enables developers to follow the guideline D.R.Y. (“Don’t Repeat Yourself”):

  • abstraction
  • generalization
  • encapsulation
  • decomposition

Q16. Which of these UML class diagrams shows an association relationship?

  • a)
  • b)
  • c)
  • d)

Q17. Which of these UML class diagrams depicts an aggregation (“has-a”) relationship between the two classes?

  • a)
  • b)
  • c)
  • d)

Q18. Which of these UML class diagrams depicts a composition, or a strong “has-a” relationship?

  • a)
  • b)
  • c)
  • d)

Q19. Select the object pairing that has an association relationship:

  • Book – Page
  • Tree – Root
  • Coffee – Water
  • Hiker – Trail

Q20. Select the object pairing that has an aggregation relationship:

  • Car – Road
  • Stapler – Staple
  • Pie – Crust
  • Book – Page

Q21. Select the object pairing that has a composition relationship:

  • Book – Page
  • Tea – Sugar
  • Record Player- Record –
  • Bear – Forest

Q22. Choose the two answers that correctly complete the following sentence:

  • “We say that a class has low cohesion if…”
  • …it tries to encapsulate too many unrelated responsibilities.
  • …connects to many other classes.
  • …its purpose is unclear.
  • …it does not have all the necessary parts, i.e. it is incomplete.

Q23. Two classes are tightly coupled. What are some ways you might be able to tell? Choose the two correct answers.

  • They can easily be swapped with different implementations of the same class
  • Their interactions are limited and controlled
  • They are very highly reliant on each other
  • In order to understand one class, you need to open up the other to look at the implementation

Q24. How can you apply the principle of Separation of Concerns in object-oriented programming?

  • Separate objects or components according to their role in the software
  • Ensure classes are only concerned with their own data
  • Separate data and actions (methods) into different classes
  • Split developers into teams that each deal with different parts of the software

Q25. Which of these violates Liskov’s Substitution Principle?

  • subclasses specify the abstract methods of the superclass
  • an operation in the superclass is replaced by a different operation in the subclass
  • the superclass is too general
  • the subclass adds behaviour

Q26. For which of these situations would you use a sequence diagram?

  • To show all of the different processes of your program.
  • To show the different modes that your program can be in.
  • To show the relationship between classes
  • To show the collaborative behaviour of objects in your program.

Q27. Choose the correct state diagram for a car which has a state called “HasGas:”

  • a)
  • b)
  • c)
  • d)

Q28. Which of these elements represents a termination in a UML State diagram?

  • a)
  • b)
  • c)
  • d)

Q29. What is the purpose of model checking?

  • To verify that the conceptual model of your software matches the customer’s requirements.
  • To check the software for errors before release
  • To test for user-reported bugs
  • To verify that the technical implementation matches conceptual mockups

Q30. What is an abstract data type?

  • a type of data defined by the developer rather than the language.
  • a data-centric class
  • a data type that cannot be used directly but must be implemented as an interface
  • variables that are assigned a type (i.e. integer, double) but does not yet have a value assigned.
Get All Course Quiz Answers of Software Design and Architecture Specialization

Object-Oriented Design Coursera Quiz Answers

Design Patterns Coursera Quiz Answers

Software Architecture Coursera Quiz Answers

Service-Oriented Architecture Coursera Quiz Answers

Team Networking Funda
Team Networking Funda

We are Team Networking Funda, a group of passionate authors and networking enthusiasts committed to sharing our expertise and experiences in networking and team building. With backgrounds in Data Science, Information Technology, Health, and Business Marketing, we bring diverse perspectives and insights to help you navigate the challenges and opportunities of professional networking and teamwork.

Leave a Reply

Your email address will not be published. Required fields are marked *