Software Engineering II MCQs with Answers
Practice important Software Engineering II MCQs with answers and explanations.
Chapter: 43
Q1281:
In the Price class, what method is responsible for providing price code?
A. price()
B. priceCode()
C. getPrice()
D. calculateCode()
Correct Answer:
B
Chapter: 43
Q1282:
The method charge(int daysRented) inside Price uses a ________ statement.
A. if-else
B. for loop
C. switch
D. try-catch
Correct Answer:
C
Chapter: 43
Q1283:
In the Movie class constructor, after modification, the price is set using which method?
A. setPriceCode()
B. beRegular(), beChildrens(), or beNewRelease()
C. initPrice()
D. priceSetter()
Correct Answer:
B
Chapter: 43
Q1284:
Which refactoring principle is followed by moving charge() to Price class?
A. Replace Type Code with State/Strategy
B. Replace Constructor with Factory Method
C. Extract Method
D. Pull Up Method
Correct Answer:
A
Chapter: 43
Q1285:
How does the new method Movie.newChildrens(String name) create an object?
A. new Movie(name, Price.CHILDRENS)
B. new Movie(name) then call beChildrens()
C. call createChildrensMovie(name)
D. instantiate Movie with Children's object
Correct Answer:
B
Chapter: 43
Q1286:
What pattern allows an object to alter its behavior when its internal state changes?
A. Strategy Pattern
B. State Pattern
C. Template Method Pattern
D. Bridge Pattern
Correct Answer:
B
Chapter: 43
Q1287:
The main drawback of subclassing to represent movie types is ________.
A. Overhead memory usage
B. Code duplication
C. Inability to change class dynamically
D. Complexity in implementation
Correct Answer:
C
Chapter: 43
Q1288:
In the chain of charge methods in Rental class, which object finally calculates the charge?
A. Rental
B. Tape
C. Movie
D. Customer
Correct Answer:
C
Chapter: 43
Q1289:
The frequentRenterPoints(int daysRented) method returns 2 points for which condition?
A. If the movie is a New Release and rented more than one day
B. If the movie is Regular
C. If the movie is Childrens
D. If rental days are more than 5
Correct Answer:
A
Chapter: 43
Q1290:
Which class hides the constants like REGULAR, CHILDRENS, and NEW_RELEASE after refactoring?
A. Tape
B. Rental
C. Price
D. Customer
Correct Answer:
C
Chapter: 43
Q1291:
How is the Price object obtained in Movie class?
A. Direct instantiation
B. Using static factory methods
C. Through constructor injection
D. Via Rental class
Correct Answer:
B
Chapter: 43
Q1292:
What would the statement Movie.newRegular("Inception") create?
A. New Release movie
B. Children's movie
C. Regular movie
D. Documentary movie
Correct Answer:
C
Chapter: 43
Q1293:
Which of the following is NOT a Price subclass?
A. RegularPrice
B. OldPrice
C. ChildrensPrice
D. NewReleasePrice
Correct Answer:
B
Chapter: 44
Q1294:
What does CMM stand for?
A. Capability Maturity Map
B. Capability Maturity Model
C. Certified Maturity Model
D. Capable Maturity Management
Correct Answer:
B
Chapter: 44
Q1295:
The CMMI integrates ______ into a single process improvement framework.
A. only software disciplines
B. only system disciplines
C. systems and software disciplines
D. hardware and software disciplines
Correct Answer:
C
Chapter: 44
Q1296:
Which organization uses the term Capability Maturity Model® (CMM®)?
A. ISO
B. IEEE
C. Software Engineering Institute (SEI)
D. Microsoft
Correct Answer:
C
Chapter: 44
Q1297:
In CMMI, the two types of representations are ______.
A. simple and complex
B. staged and continuous
C. formal and informal
D. complete and partial
Correct Answer:
B
Chapter: 44
Q1298:
Staged representation provides a ______ for improvements.
A. random order
B. proven sequence
C. complex path
D. flexible path
Correct Answer:
B
Chapter: 44
Q1299:
Continuous representation allows improvement based on ______.
A. manager's preference
B. business objectives and risk
C. client's suggestions
D. employee requests
Correct Answer:
B
Chapter: 44
Q1300:
The Software CMM follows a ______ structure.
A. continuous
B. hybrid
C. staged
D. random
Correct Answer:
C