Lecturers in AAU asked the University Library to inform them by e-mail of new arrivals (books)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Lecturers in AAU asked the University Library to inform them by e-mail of new arrivals (books) matching their teaching subjects. The library released a service called Current Awareness Services (CAS) and advised lecturers to register their profiles with this service. A lecturer profile has a lecturer ID, e-mail address and one subject of interest (as string). The library maintains its new books in a hash map with book ID as the key and the subject string as value. When CAS observes any changes of in the map contents (e.g., adding new book entries), it iterates through lecturers' profiles and send e-mails to lecturers whose interest subjects matches new books' subjects in the map. 1. [2 marks] What design pattern would you use to design a solution for the above requirements. Justify your answer. 2. [5 marks] Draw a collaboration diagram for the design pattern customized to the problem above. 3. [5 marks] Based on the collaboration diagram you have already done, draw a design class diagram (CDC). 4. [5 marks] Implement in Java code the pattern you have already modelled. Lecturers in AAU asked the University Library to inform them by e-mail of new arrivals (books) matching their teaching subjects. The library released a service called Current Awareness Services (CAS) and advised lecturers to register their profiles with this service. A lecturer profile has a lecturer ID, e-mail address and one subject of interest (as string). The library maintains its new books in a hash map with book ID as the key and the subject string as value. When CAS observes any changes of in the map contents (e.g., adding new book entries), it iterates through lecturers' profiles and send e-mails to lecturers whose interest subjects matches new books' subjects in the map. 1. [2 marks] What design pattern would you use to design a solution for the above requirements. Justify your answer. 2. [5 marks] Draw a collaboration diagram for the design pattern customized to the problem above. 3. [5 marks] Based on the collaboration diagram you have already done, draw a design class diagram (CDC). 4. [5 marks] Implement in Java code the pattern you have already modelled.
Expert Answer:
Answer rating: 100% (QA)
1 The design pattern that would be suitable for this scenario is the Observer pattern The Observer pattern allows for a onetomany relationship between ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Beck Manufacturing reports the following information in T-account form for 2019. The following data is provided for Garcon Company and Pepper Company. Garcon Company Pepper Company Beginning finished...
-
Jintao Ltd. incurred the following transactions related to current liabilities: 1. Jintao's cash register showed the following totals at the end of the day on April 10: pre-tax sales $25,000; GST...
-
A gas mixture at 250 F, 18 lbf/in. 2 is 50% N 2 , 30% H 2 O, and 20% O 2 on a mole basis. Find the mass fractions, the mixture gas constant, and the volume for 10 lbm of mixture.
-
During a storm, a snow drift is formed behind a snow fence as shown in Fig. P7.56. Assume that the height of the drift, \(h\), is a function of the number of inches of snow deposited by the storm,...
-
South Seas Products, Inc., has designed a new surfboard to replace its old surfboard line. Because of the unique design of the new surfboard, the company anticipates that it will be able to sell all...
-
Strict liability offenses are those that do not require the formation of criminal intent for an individual to be found guilty. Hints: Use these resources to answer the questions below....
-
The Oldowan Complex dates to the Group of answer choices Upper Paleolithic. Lower Paleolithic. Eocene. Solutrean.
-
From the following data, you are required to Prepare for the month of July 2013 the following budgets. (A.C.3.1, 3.2. 3.3, 3.4) (a) Production (b) Material usage (c) Purchases (d) P & L A/c for each...
-
The plunge in technology shares is providing investors with a harsh lesson in the reflexivity of stock-based compensation, which acts as a tailwind for companies while stock prices are increasing but...
-
Maben Company was started on January 1, Year 1, and experienced the following events during its first year of operation: 1. Acquired $30,000 cash from the issue of common stock. 2. Borrowed $40,000...
-
Suppose the inverse industry supply curve is given as = 5 + (10/n)q where n is the number of firms that are in the industry and q is industry output. Suppose the inverse industry demand is given as p...
-
Given the function 3x+9 x < 0 f(x) = 3x 18 x 0 Calculate the following values: (-1) = (0) = f(2) =
-
To get iron(ll) sulphide from FeCl3 .. a. Adding NaOH, heating > 200 C, reduction then /S b. Reduction, heating > 200 C, adding NaOH then /H2S c. Heating > 200 C, reduction, heating /S then...
-
Read the following description and Write a response of it. The discretion of public administrators can be decreased, but not altogether eliminated. Officials will use their discretion in any given...
-
Under what circumstances might a representation vote not be required for certification?
-
Why might an employer apply for decertification?
-
Outline the stages of union-management negotiations.
-
A batch distillation facility has a bank of columns of Type 1 and another bank of Type 2. Type 1 columns are available for processing \(6,000 \mathrm{hr} /\) week, and Type 2 columns are available...
-
During the 2002 Winter Olympics in Salt Lake City, Utah, a local microbrewery received a rush order for 100 gallons of beer containing at least 4.0 volume \(\%\) alcohol. Although no \(4 \%\) beer...
-
Willy Wonka has engaged your consultation services to assist in the recipe formulation of a new brand of chocolate bar, weighing \(100 \mathrm{~g}\), which he plans to name "Super-choc." Each...
Study smarter with the SolutionInn App