Lab – Design Patterns
1. Let us build a sales reporting application for the management of a store with multiple departments. The features of the application include:
• Users should be able to select a specific department they are interested in.
• Upon selecting a department, two types of reports are to be displayed:
– Monthly report — A list of all transactions for the current month for the selected department.
– YTDsaleschart — A chart showing the year-to-date sales for the selected department by month.
• Whenever a different department is selected, both of the reports should be refreshed with the data for the currently selected department.
You just only create the UML Class Diagram
2. Suppose we have to build a banking application for manipulating various information types. The information types are classified by the degree of confidence. To support this feature, the application must use different encryption methods. The existing encryption methods include:
1) Simple Encryption - When this encryption is applied, characters in the plain text message are shifted to the right or left by one position.
Example:
Plain text:This is a message
Cipher text:eThis is a messag
2) Caesar Cypher - In its simplest form, the Caesar cipher is a rotation-substitution cipher where characters are shifted to the right by one position. It involves replacing the letter A with B, B with C, and so on, up to Z, which is replaced by A.
Example:
Plain text:This is a message
Cipher text:Uijt jt b nfttbhf
3) Substitution Cypher - This encryption algorithm uses a letter substitution table to replace different letters in the plain text with corresponding entries from the substitution table.
To encrypt a given plain text, look up letters from the plain text in the top row of the letter substitution table and replace it with the corresponding letter from the bottom row in the same column.
Example:
Plain text: This is a Message
Cipher text: mWNR NR T DXRRTnX
You have to create a UML Classs Diagram and Java application