Reference no: EM133011125
Assignment Tasks - Portfolio
Task 1
Write a program to find the solution for the following problems using Recursion.
1.1 Input n values into an array a[] using the scanner class. Find the maximum of an array. If n= 1, a[0] is the only number in the array and so, maximum = a[0]. If n > 1, then find the maximum of n-1 entries of the array.
1.2 Print n (choose n > 10) Fibonacci numbers. The first five Fibonacci numbers are F0=0, F1 = 1, F2 = 1, F3 = 2, F4 = 3.
(800 words)
Task 2
System design
A retail store wants to introduce a home delivery service for its customers. To make their offer is as widely available as possible, they need to implement an online ordering solution allowing customers to browse their online retail store and place orders via their website. The solution needs to support the following functionality.
1. On the admin side:
i) Arranging online store into department/categories such as confectionary, frozen, dairy, drinks etc.
ii) Populating the website database with items available for home delivery.
iii) Creating reports on the ordered items for a selected period of time.
2. On the customer side:
i) Browsing the online store with limited necessary items
ii) Making a selection of items and adding the selection into the shopping basket
iii) Entering their delivery address
iv) Entering payment details and placing the order
v) Leaving customer reviews.
a) Using UML class diagrams demonstrate the static view of the system. The diagrams should depict an unambiguous class hierarchy and relationships between the classes.
b) Using UML sequence or activity diagrams demonstrate the system's dynamic view. The diagrams should represent key interactions between methods involved in the various processes of its functionality.
Task 3
Consider this UML class diagram showing part of a program to manage the membership information for a professional society:

a) Write a Java version of the class diagram shown above.
b) Assume the standard membership fee is fixed at £50. For a senior member the membership fee is set when a SeniorMember object is created. Create a text file in the path cAjava\memberships.txt with some dummy membership data. Check whether the text file exists using the command exists(), isDirectory(), isFile(), getName() and getAbsolutePath().
c) Discuss the methods (if required) that need to be added to each class to write to the data file.
d) Test your application by creating a new membership record. Include a test log.