Question 1) Briefly discuss the purpose of software modelling and how you have used software modelling in your individual tennis project.

Software modelling tools are abstractions used in software engineering to represent what is critical without going into unnecessary details, they help developers deal with complexities in problems being solved. Software models basically help to analyze software complexities as well as in coming up with a strategy or approach towards development. In my individual tennis project, I used UML case diagram to capture the functional requirements. I was able to model the structure of the system by modelling the project’s classes, their individual attributes as well as operations within a UML class diagram. This gave me a snapshot of the classes at the java code level needed to develop the software application.

Question 2) Imagine a system that you are not familiar with, like designing a driverless vehicle. Describe at least four activities that you would take in order to tackle this problem.

I would first undertake an Object-oriented analysis through ascertaining the system requirements and perhaps build a use-case model. This would allow me understand the interaction between the various agents for instance between passengers and the vehicle. I would also identify the specific classes and their correlation to other classes within this problem area. Secondly, I would undertake an Object-oriented design by refining the classes, methods, attributes and structures that I identified in the first activity. I would also see if there any additional classes that I may have missed in activity one. Third, I would develop a prototype, this would give me a clear picture about the complexities with regard to implementation of the driverless vehicle features. Fourth, I would implement my system, with the aid of a range of technologies, I would transition from prototyping to assembly of developed and tested application components that complement each other. The entire application will be based on several modules integrated together into a fully functioning system

Question 3) If the requirements of a simple system to be developed are fixed, explain which software development methodology you would prefer to use and why.

If requirements of a system are fixed, I would opt for the Waterfall software development methodology. This is an approach whereby work is completed in one stage before moving to the next, given the project scope will remain static, it will be easier to come up with the budget and timelines before the project begins. It is a straightforward approach where every stakeholder knows what needs to be done and when, this will allow first project completion as opposed to the other available approaches. There will be no requirement for persistent communication among the project team as long as they provide status reports, the Go live date can also be certainly determined during project inception.

Question 4) Briefly explain an advantage of object-oriented systems development. What are the biggest challenges that a programmer might encounter in object-oriented systems development? (You may add your experience working on your individual tennis project.)

From personal experience, I would go for the faster development due to high code reusability as the biggest advantage. In OOP, when new objects are created, they automatically inherit the characteristics and attributes of the classes that they were spawned. New objects will simply inherit the data from all the super-classes in which they participate in. This reduces the amount of code as well as effort in re-writing code fragments. One disadvantage is larger program sizes; object oriented systems tend to involve many lines of code as opposed to procedural systems. This forces the developer to spend more time writing codes and remembering specific implementations as opposed to procedural systems.

Question 5) Find all the actors and Draw a UML Use Case diagram for the following scenario for buying a product with appropriate relationships between the use cases: Customer browses catalog and selects items to buy, she then goes to check out. She fills out shipping information. System presents full pricing information; customer fills out card information. System authorizes purchase, confirms sale immediately, and sends confirmation email to customer.

Question 6) Draw a UML class diagram to capture the following scenario with appropriate relationships between the classes, and multiplicity specifications: Every student is enrolled in a course. Each student may be enrolled in a set of modules. Some modules are core modules for one or more courses and some modules are optional modules for one or more courses. A course must have at least one student enrolled in it. A module of either kind must have at least one student and a student must be on at least one module of either kind.

Question 7) Discuss Single Responsibility Principle (SRP). Explain whether the following code conforms to the SRP. If yes, explain why. If not, explain how you can fix it.

public class Employee

{

private String employeeId;

private String name;

private string address;

private Date dateOfJoining;

public Double calcIncomeTaxForCurrentYear()

{

 //income tax logic implementation

}

 //Getters & Setters for all the private attributes

}

Single responsibility principle dictates that each class, module or function within a computer program should have some level of responsibility over a single component of the program’s functionality, and ought to encapsulate such a part. It essentially ascertains how developers should modularize their code in object-oriented system design.

The Employee class is logically correct, given it has most of the attributes of the employee including employeeid, name, address and date of joining. It goes ahead to calculate the income tax the employee has to pay within a year. Nevertheless, the Employee class simply does not abide by the Single Responsibility Principle. The logic of ascertaining employee income tax calculation is the responsibility of the accounts department. As such, the Employee class must have the single responsibility of only maintaining the core attributes of an employee.

We can fix this as follows

Public class AccCalculations

{

            Public Double calcIncomeTaxForCurrentYear()

{

                        //income tax logic implementation

                        }

}

Public class Employee

{

private String employeeId;

private String name;

private string address;

private Date dateOfJoining;

 //Getters & Setters for all the private attributes

}

Question 8) In the code below, three key design patterns are employed from the list of GOF patterns that we have discussed in our lectures. Identify them and explain which classes play what roles in them.

public interface Interface_1

{

public Interface_2 fun1_1();

 }

interface Interface_2

{

public void fun2_1(Interface_3 i);

public void fun2_2();

}

interface Interface_3

{

public void fun3_1();

}

class Class_1 implements Interface_1

{

            private static Class_1 c1 = new Class_1();

private Class_1()

{

                        }

private static Class_1 f_1()

{

return c1;

}

public Interface_2 fun1_1()

{

return new Class_2();

}

}

class Class_2 implements Interface_2

{

private ArrayList c2 = new ArrayList();

public void fun2_1(Interface_3 i) { c2.add(i);

}

public void fun2_2()

{

for (Interface_3 i : c2) { i.fun3_1();

}

}

}

class Class_3 implements Interface_3

{

public void fun3_1()

{

System.out.println(“Learning design Pattern is more fun!”);

                        }

}

class Class_4 {

public static void main(String[] args)

{

System.out.println(“Learning OOSD is fun!”);

}

}

Essentially, the GoF design patterns are grouped into three specific categories that include creational patterns for objects creation, structural patterns to offer relationships between objects as well as Behavioral patterns which define how the objects will interact. Creational patterns handle mechanisms of object creation and creating objects in a way that is suitable for the situation. From the code we can see that the Factory creational pattern has been used in a case where there is a superclass and based on input, the code needs to return one of the subclass.

class Class_1 implements Interface_1

{

private static Class_1 c1 = new Class_1();

private Class_1() { } private static Class_1 f_1()

{

return c1;

 }

public Interface_2 fun1_1()

{

return new Class_2();

}

}

There is also an instance of structural pattern, where a structure has been created in a manner that all the objects within the structure will be treated by the code in the same way.

interface Interface_2

{

public void fun2_1(Interface_3 i);

public void fun2_2();

}

Behavioral design helps to identify common communication techniques between objects that realize these techniques. The below code from above code exemplifies representation of iterator behavioral design pattern to provide an easier way to access some elements of an aggregate object sequentially without necessarily exposing the underlying representation.

class Class_2 implements Interface_2

{

private ArrayList c2 = new ArrayList();

public void fun2_1(Interface_3 i)

{

c2.add(i);

}

public void fun2_2()

{

for (Interface_3 i : c2)

{

i.fun3_1();

}

}

}

Question 9) This question is related to your individual tennis project and Agile software development methodology. Write a short (around 500-700 words) report analysing how the individual project will be carried out and handled as a group project. Assume you were the leader of your four-person team when it came to writing the report. Your report should outline the typical steps that you would follow to develop the system in relation to an Agile development episode. Your answer should consider the following steps: strategy planning and continuous team iterations; feature: communication; and goal: simplicity

Agile methodology is an iterative method to software development where all team members assist to deliver value to the clients faster and with few shortcomings. Rather than working towards the entire solution, it provides for small deliveries, but consumable increments. In this case, requirements are constantly evaluated to allow the teams be able to respond quickly to changes. In my tennis project, working with a team of four, the first phase would be planning and allocation of duties. The first position would be a project leader or manager who would facilitate the work done by the development team, he will also handle risks and assist the team remain focused so as to deliver product iterations on schedule basis. The remaining three members would form the development team.

During the planning phase, the main agenda will be strategy formulation whereby we will take stock with regard to the kinds of requirements at hand, risks and possibilities for change. We would also come up with a clear destination or rather what would be acceptable as a project that meets all the provided requirements. Third is coming up with a project plan that will involve breaking down the entire project into smaller components with timelines along each component. Each of the development team members would then be assigned a sub module to deliver for each iteration.

After defining requirements for the first sprint, development will begin.

The focus will be releasing the first iteration of the project and having a product to take to production at the end of the iteration. The first iteration will also focus on core functionality and give room for additional changes during the project lifecycle. Prior to deployment of a pack to production, a number of tests will be performed including user acceptance and system integration, any defects found from the tests will then be patched before deployment to live environment. Furthermore, any defects that cannot be fixed under the timeframe given for that iteration shall be deferred to the next iteration and given priority.

As a project leader, I will be in charge of communication regarding the project, I will engage the team to provide status updates and control the project timeline. Where there is need for documentations it will also be my responsibility. After deploying the first version to production, the team will focus on any requirements left out or additional requirements needed for the project, this shall also be governed by timeframes and taken through an extensive user acceptance testing process. The features will only be promoted to production environment once they have been ascertained to conform to requirements.

After deployment to production, the team will then provide training for any potential system users coupled with comprehensive system documentations. The team will also set a date for Go live where all the features will be rolled out as a unified working project. The team will then take up post implementation support to work on any defects, nice to have requirements and upgrades that come up after Go Live.

2021-08-09