What is the difference between object-oriented programming and procedural programming?
Procedural programming can use looping and branching, but object-oriented programming cannot.
Procedural programming uses subroutines, but object-oriented programming does not allow them.
Procedural programming specifies a sequence of tasks, but object-oriented programming describes the properties of tools or items.
Procedural programming specifies a sequence of calculations, but object-oriented programming involves more logic.
How does dynamic polymorphism differ from static polymorphism?
It uses inheritance instead of abstraction.
It uses overriding instead of overloading.
It uses abstraction instead of inheritance.
It uses overloading instead of overriding.
What is overriding a method?
Removing an inherited method from a subclass.
Adding a subclass method to a superclass.
Changing the name of a method.
Creating a unique version of an inherited method.
How are analysis and design different?
Analysis describes a problem; design describes a solution.
Analysis constructs; design dissects.
Analysis considers abstractions; design considers data.
Analysis describes a solution; design implements a solution.
What is the term for a visual representation of the classes in an application?
Whiteboard sketch
CRC card
Use case
Class diagram
In addition to attributes and methods, what does a UML class diagram contain?
The class name
All objects created from the class
The superclass of the subclass
Any inherited behavior
How do object behaviors and attributes differ?
Attributes apply only to a specified object, but behaviors apply to other linked objects.
Behaviors are vector quantities, but attributes are scalars.
Attributes describe a state, but behaviors describe actions.
Behaviors describe dynamic properties, but attributes are static.
You are designing a traffic simulation program. What is a possible attribute that you could use for a car object?
Opening the door
Accelerating
Cleaning
Gas mileage
Shonzu has gathered the requirements for a new solution, described the application he is going to build, and identified the main objects in the solution. What should he do next?
Describe object interactions.
Start writing code.
Build class diagrams.
Build CRC cards.
What is the purpose of encapsulation?
To protect an object from unwanted changes
To eliminate redundant properties
To separate attributes from behaviors
To organize attributes and behaviors in a hierarchical fashion
In addition to attributes and behaviors, which quality must a class possess?
A data type
A state
A sex or color
A name
Steve is able to turn on and adjust his television even though he does not know how it works internally. This exemplifies which principle of object-oriented programming?
Abstraction
Polymorphism
Inheritance
Encapsulation
If an attribute is added to a superclass, what happens to all of the objects of the subclass?
Each subclass object must request the additional attribute.
Nothing happens to the subclass objects.
Each subclass object automatically receives the additional attribute.
Only newly created subclass objects will receive the new attribute.
{"name":"What is the difference between object-oriented programming and procedural programming?", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What is the difference between object-oriented programming and procedural programming?, How does dynamic polymorphism differ from static polymorphism?, What is overriding a method?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker