Questions 2012-2013
Programming project
Barbara Russo
General question:

1. What are the three beasts that affect software development?

2. What are the major principles of OO paradigm? 

2.1 Make an example of Encapsulation.

2.2 Make an example of Information Hiding.

2.3 How many forms of abstraction we have seen in the Java language?

2.4 What does Modularisation mean? 

2.5 How Information Hiding and Encapsulation are implemented in Java? Make a code example.

2.6 Make an example of reuse in Java

3  Introduce Inheritance, discuss the Liskov principle, and make an example.

3.1 How many types of subclassing. Which are subtypes?

3.2 What is the open/close principle and discuss its relation with the Liskov principle 

OO Analysis

0. What is the goal and the scope of OO Analysis?

1. What is a software requirement and what is a specification?

2. Which type of requirements dis we see? Make an example for each of them

3. What is a scenario? How do you derive user stories from a scenario? 

3.1 Make an example of scenario

4. What is a user story? How many user stories a project should have? How would you represent a set of user stories?

4.1 Make an example of user story that you extract from a scenario

4.2 Look at this user story. How would you fix this user story to make it compliant with the standard?

4.3 How do you derive an acceptance test? How acceptance tests relate to users stories?

OO Design

0. What is the goal and the scope of OO Design?

1. How do you derive a CRC card from user stories? How would you represent a set of CRC cards?

1.1 Make an example of CRC cards that you extract from a scenario

2. Look at this set of user stories and draw the corresponding CRC card diagram.

3. How do you create a UML class diagram from CRC diagrams? Make an example. 

Memory models

1. What is the scope and the extent of a variable?

2. Solve the following exercise until line XXX

3. Describe the winding mechanism and the scope resolution in the memory models

Testing

1. What is the purpose of TDD?

2. Describe the procedure to derive test cases and code in TDD

3. Look at this UML class and derive the code with TDD. XXX

4. What is the goal of testing? 

5. When do you perform acceptance testing? How would you implement it?

6. Describe the different strategies for code coverage. Solve the following exercise. XXX

7. Look at this method and check its coverage XXX

8. Look at this code and use equivalent partition to test it. XXX

Exception handling

1. Exception handling. How does Java handle exceptions? How would you create an exception that is checked by the compiler?

2. What is the unwinding mechanism? What is exception handling? How an exception is throw?

3. When would you use an exception that is child of Error or RuntimeException?

4. What is checked and unchecked exception? 

Programming

1. What are virtual functions in general and how are they implemented in Java? Make an example XXX

2. Discuss homonymous member data. in inheritance. Why super.super does not exist?

4. What is delegation? When would you use it? Make an example XXX

5. How would you implement pseudo polymorphism in Java? Make an example XXX

RTTI and reflection

1. What is the problem with collections? How does RTTI solve the problem? 
 
2. How is RTTI implemented in Java? Make an example. (Down casting, instanceOf(), getClass()) 

3. What is the goal to use API reflection in Java?  Describe the Class class in the reflection API and how the JVM works

Generics

1. When do you use generics? Make an example.

2. How is inheritance handled with generics? Make an example

3. Describe wild cards. What are the limit of the wildcards?

4. What is the purpose of parametrized classes and methods with generics? 

5. What is type inference and type erasure? Why can't you use instanceOf with generics?

Design patterns

1. What is a design pattern and what are the key factors that define a pattern?

2. What are the types of design patterns?

3. Make an example in which delegation is used in a pattern. Make an example of a pattern that uses delegation and inheritance to get the target.

3. Describe the two types of implementation for the singleton pattern in Java. 

4. Describe the Builder pattern. What is the goal and how the pattern is implemented in Java? 

5. How the factory method is used in the abstract factory pattern?

6. How do you recognise a Prototype pattern?

7. How would you design the Composite pattern?

7. Why  the Adapter pattern is under the category structural? Make an example for Adapter at class and object level.

8 What is the goal of the Observer pattern? Drow the UML class diagram of the pattern and make an example of use