Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There are many who make the argument that climate change is going to affect weather patterns, and, thus, the amount of rainfall that is going

image text in transcribed

There are many who make the argument that climate change is going to affect weather patterns, and, thus, the amount of rainfall that is going to fall. Some may get more, while others will get less. Tracking rainfall is, therefore, an important task. For the sake of this scenario, you may assume the following about designing an application that tracks rainfall. - Rain data is stored using 3 pieces of data: the station that recorded the rainfall, the date for which the rainfall is recorded, and the amount of rain in mm. - Obviously, there must be some way of recording all this data in a container. - There should be a way of graphing the data. Initially, only a bar graph and a column graph are required. The data that is passed to the graphing application is an XML representation of the container holding all the rainfall data. - Clearly, then, there needs to be some way of getting an XML representation of the rain record. - The main client will be responsible for holding the record of all the rainfall data, for getting the XML representation of all the rainfall data, and for passing this to the user's choice of graph. - Appropriate design patterns should be used as necessary. Question 1 [25 marks] 1.1 Considering the scenario given above, draw a partial UML class diagram that captures the scenario. You should include the necessary classes, class attributes, and class relationships that are mentioned in the scenario. Class constructors and member access specifiers are not required. However, you should ensure that you include all the data members and member functions that show how data will be moved around the application. You should include the Client/GUI class. [You may use a software tool to create the UML class diagram. Use underlining to represent italics in hand-drawn UML class diagrams.] 1.2 It has been argued that the design pattern that would be used here is a behavioural pattern. Do you agree, indicating which pattern would be used and why it is or is not a behavioural pattern? 1.3 It was decided to provide the class that holds the rain data with some reflective functionality. That is, a getData () function should return a single data string that contains all the data held by the class via the class's meta-object, in a property named data. This function is used only by the meta-object and should not be available to users of the class. Write the class definition for this class showing how this would be set up. You are not required to include functionality or data members not mentioned above, or to code the implementation of the getData () function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

1. How is the newspaper help to our daily life?

Answered: 1 week ago

Question

1. Prepare a short profile of Mikhail Zoshchenko ?

Answered: 1 week ago

Question

What is psychology disorder?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago