Practice Exam
Q2) Functional vs Non-Functional refers to
- a) Prototype
- b) Requirements
- c) Testing
- d) Architecture
- e) Maintenance
Show Answer
Correct Answer: b) Requirements
Q5) Benefits of using cloud software.
- a) No need for maintenance (for clients)
- b) Availability
- c) Scalability
- d) Less staff required
- e) All the above
Show Answer
Correct Answer: e) All the above
Q8) The Strategy pattern replaces inheritance with __________________
Show Answer
Correct Answer: Composition
Q11)
public class Geometry {
int area(int height, int width) {
return height * width;
}
int volume(int height, int width, int depth) {
int area = height * width;
return area * depth;
}
}
The above code violates:
- a) YAGNI
- b) DRY
- c) Dependency Inversion
- d) Liskov Substitution
- e) Single Responsibility
Show Answer
Correct Answer: b) DRY
Q14) Which of the following are true? (Note: More than one can be true.)
public class MedicalRecord {
public Database database;
public MedicalRecord(Database database) {
this.database = database;
}
}
- a) MedicalRecord and Database have an IS-A relationship
- b) MedicalRecord composes the Database object
- c) Database is encapsulated
- d) MedicalRecord is dependent on Database
- e) MedicalRecord and Database have a HAS-A relationship
Show Answer
Correct Answers: b), d), e)
Q17) Which of these do not involve incremental development.
- 1) Xtreme Programming
- 2) Agile
- 3) Scrum
- 4) Software Reuse
- 5) Iterative development
Show Answer
Correct Answer: 4) Software Reuse
Q20) Which Design Pattern uses the principle, Open for Extension Closed for Modification?
- 1) Observer
- 2) Strategy
- 3) All the above
- 4) None of the above
Show Answer
Correct Answer: 3) All the above
Q23) Challenges facing software engineers.
- 1) New technologies
- 2) Reduced delivery times
- 3) Developing trustworthy software
- 4) Global Competition
- 5) All the above
Show Answer
Correct Answer: 5) All the above
Q26)
public interface Bank {
void borrow();
}
public class BankOfFrance implements Bank {
public void borrow() {}
}
public class BankOfSpain implements Bank {
public void borrow() {}
}
public class FinancialInstitutions {
List<BankOfFrance> frenchBanks = new ArrayList<>();
List<BankOfSpain> spanishBanks = new ArrayList<>();
public void borrowFromBanks() {
for(BankOfFrance b : frenchBanks)
b.borrow();
for(BankOfSpain b : spanishBanks)
b.borrow();
}
}
Which of the following is true?
- 1) FinancialInstitutions class is using Inheritance
- 2) FinancialInstitutions class should use composition
- 3) BankOfFrance should use
extends
rather thanimplements
- 4) FinancialInstitutions is closed for modification
- 5) FinancialInstitutions should use the Observer pattern
Show Answer
Correct Answer: 5) FinancialInstitutions should use the Observer pattern
Q32) Regarding the singleton pattern, the following is true:
- a) Only one instance of an object
- b) Protects access to global object
- c) Object can be created first time it is used
- d) Object can be created when program starts or at runtime
- e) All the above
Show Answer
Correct Answer: e) All the above
Q38) The following is true about incremental development…
- 1) Customer involvement is not recommended
- 2) All requirements are determined before coding
- 3) Easy to make modifications (change requirements)
- 4) Code does not need refactoring
- 5) Only testing done is unit testing
Show Answer
Correct Answer: 3) Easy to make modifications (change requirements)
Q41) Software specification, software development, __________________, software evolution. Which step is missing?
Show Answer
Correct Answer: Testing
Q44) Software for the following are usually developed using different process models:
- 1) refrigerator software and medical software
- 2) airplane software and medical software
- 3) game software and medical software
- 4) Scalable software and software that can handle unlimited users
- 5) your web site with Amazon checkout and using 3rd party graphics library for your game software
Show Answer
Correct Answer: 3) game software and medical software
Q47)
- a) Feasibility
- b) Requirements
- c) Design
- d) Development
- e) Testing
These steps should be performed in the following order:
- 1) A), B), C), D), E)
- 2) D), B), C), A), E)
- 3) A), C), D), B), E)
- 4) Any order is OK
- 5) B), C), D), E), A)
Show Answer
Correct Answer: 1) A), B), C), D), E)
Q50) The following type of software can possibly be reused for many different projects:
- 1) System
- 2) Object
- 3) Component
- 4) Web service
- 5) All the above
Show Answer
Correct Answer: 5) All the above
Q56) Which process model is represented by the image below?
- 1) WaterFall
- 2) V Model
- 3) Incremental model
- 4) Re-Use Model
- 5) Step model
Show Answer
Correct Answer: 3) Incremental Model
Q59) RE UL: The image below represents:
Show Answer
Correct Answer: Inheritance
Q65) Which process model is represented by the image below?
- 1) Association
- 2) Abstraction
- 3) Encapsulation
- 4) Polymorphism
- 5) Inheritance
Show Answer
Correct Answer: 1) Association
Q68) Which class below is the optimal way to design code?
public interface IDatabase {}
// Line 1:
public class Accounting extends Database {}
// Line 2:
public class Accounting implements IDatabase {}
// Line 3:
public class Accounting {
IDatabase database;
}
// Line 4:
public class Accounting {
Database database;
}
// Line 5:
public class Accounting {
Object database;
}
Show Answer
Correct Answer: Line 4: The one that uses composition
Q71) I am concerned over the large turnover of staff. I am concerned about my software being:
- 1) Dependable – work w/out crashing
- 2) Usable – easy to use
- 3) Scalable – can grow with demand
- 4) Efficient – won’t waste computer resources
- 5) Maintainable – easy to fix
Show Answer
Correct Answer: 5) Maintainable
Q74) Degree necessary to be a software engineer:
- 1) Computer Science
- 2) Computer Science and Management
- 3) Information Technology
- 4) Computer Science and Hardware
- 5) None of the above
Show Answer
Correct Answer: 5) None of the above
Q77) Regarding the following:
- a) Testing
- b) Operational manual
- c) Java Code
- d) Requirements Document
- e) Technical Documentation
- f) Financing
Which of the following is true?
- 1) Only (a)(b)(c)(d)(e) are part of a software project
- 2) Only (a)(b)(c) are part of a software project
- 3) Only (c) is part of a software project
- 4) All must be written by software developers
- 5) All must be written by technical writers
Show Answer
Correct Answer: 1) Only (a)(b)(c)(d)(e) are part of a software project
Q80) Which process model requires Software Discovery?
- 1) Discovery model
- 2) Software model
- 3) Iterative model
- 4) V model
- 5) Re-use model
Show Answer
Correct Answer: 5) Re-use model