ESOF 322: Software Engineering I hw 2

$35.00

Category: Tags: , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (13 votes)

Exercise Part A (15 pts)
For each of the following (pseudo) code snippets provide the UML class diagram.
1. public class Student { (2pts)
private Assignment assignment;
}
public class Assignment {
private Student std;
}
2. public class Disk { (3pts)
private List< BackupAccess > entries;
}
public class BackupAccess {
private DiskShare x;
private List< Disk > disks;
}
public class DiskShare {
private Disk a;
private BackupAccess ba;
}
3. public class AmazonAccount{ (5pts)
private string name;
private Purchase[] entries;
private Category [] ctgrs;
}
public class Category {
private string name;
private DateTime createdDate;
}
public class Purchase{
private string name;
private Category[] categories;
private boolean isDeleted;
}
4. public abstract class Store { (5pts)
public void FetchStore(Article[] articles);
public abstract Article getInformation();
}
public interface Accounting {
void getAccountDetails();
Account updateAccountDetails();
}
public class MSUStore extends Store implements Accounting{
private string storeLocation;
public void store(Article[] articles) { Book b = new Book(); // other code …. }
public Article retrieve() { … }
}
Exercise Part B (15 pts)
Write pseudo code to describe the following UML class diagram:
Note: Different UML tools may have slight variations in notation. In this diagram, you
may ignore the small filled circle at the end of arrow heads. You may also ignore the
small icons next to attributes and methods.
Exercise Part C (5 pts)
Suppose we need to develop a system named ‘Retail System’. Draw a single use
case diagram capturing the following 4 use cases.
i) A manager can add a new product in the system.
ii) A manager can delete a product in the system.
iii) A manager can edit a product information in the system.
iv) Both use cases (i), (ii) and (iii) should reuse this new use case i.e., a product
should be available in the stock.