Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Abstract classes and interfaces are very similar. One difference is that: a) Abs

ID: 2247090 • Letter: A

Question


Abstract classes and interfaces are very similar. One difference is that: a) Abstract classes can have constructors b) Interfaces can contain state c) Interfaces can be instantiated d) Abstract classes cannot have static methods e) None of the above We talked about design patterns and anti-patterns in class. Two anti-patterns are: a) Overlooking parent behaviour & Analysis paralysis b) Fear of subclassing & Analysis paralysis c) Fear of subclassing & Overlooking parent behavior d) Fear of adding classes & Under-analysis e) None of the above In class, we discussed how a Car class could be composed of, in part, classes like CarEngine and CarMuffler. Use of such classes were an example of: a) Composition b) Decoration c) Multiplicity d) Aggregation e) None of the above In class, we discussed how a Zoo class could be composed of, in part, classes like Zebra and Giraffe. Use of such classes were an example of: f) Composition g) Decoration h) Multiplicity i) Aggregation j) None of the above Sequence case diagrams a) Describe the order in which classes and actors interact with each other b) Describe class attributes, operations, and how classes relate to each other c) Describe the state transformations made between object instances d) Describe what functionality is needed by actors that interact with the system e) All of the above

Explanation / Answer

1ans)option is (A)
the difference is abstract class can have constructors
Abstract classes can have abstract methods and normall methods .but in interface all the methods are just unimplemented.abstract class can implement interface and but interface cannot implement abstract class.

ans 3)option (A)
compostion is Has a relation car engine and car muffler are the parts of car so these classes are subclasses of Car class
IS a relation is inheritance
Has a relation is composition

ans 4)option is (A)
composition because Zoo is base class and Zoo has a
animals has a relation.



ans 5)option (e)
all the above because seqeunce diagram has an actors and intraction of objects and passing of message between them.
here first option is corect it describe which actor and classes are interact,diescribes operations and mesages etc ans 2)anti patterns is a bad programming practice in
developement of software.
option is fear os subclassing and analysis paralysis

analysis paralysis is something like not taking decision outcome in effect paralyzing.fear of subclassing is something like hard to read code

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote