Practice Exam

Q2) Functional vs Non-Functional refers to

Show Answer Correct Answer: b) Requirements

 

Q5) Benefits of using cloud software.

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:

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;
    }
}
Show Answer Correct Answers: b), d), e)

 

Q17) Which of these do not involve incremental development.

Show Answer Correct Answer: 4) Software Reuse

 

Q20) Which Design Pattern uses the principle, Open for Extension Closed for Modification?

Show Answer Correct Answer: 3) All the above

 

Q23) Challenges facing software engineers.

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?

Show Answer Correct Answer: 5) FinancialInstitutions should use the Observer pattern

 

Q32) Regarding the singleton pattern, the following is true:

Show Answer Correct Answer: e) All the above

 

Q38) The following is true about incremental development…

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:

Show Answer Correct Answer: 3) game software and medical software

 

Q47)

These steps should be performed in the following order:

Show Answer Correct Answer: 1) A), B), C), D), E)

 

Q50) The following type of software can possibly be reused for many different projects:

Show Answer Correct Answer: 5) All the above

 

Q56) Which process model is represented by the image below?

alt text

Show Answer Correct Answer: 3) Incremental Model

 

Q59) RE UL: The image below represents:

alt text

Show Answer Correct Answer: Inheritance

 

Q65) Which process model is represented by the image below?

alt text

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:

Show Answer Correct Answer: 5) Maintainable

 

Q74) Degree necessary to be a software engineer:

Show Answer Correct Answer: 5) None of the above

 

Q77) Regarding the following:

Which of the following is true?

Show Answer Correct Answer: 1) Only (a)(b)(c)(d)(e) are part of a software project

 

Q80) Which process model requires Software Discovery?

Show Answer Correct Answer: 5) Re-use model