Write OCL for the following class diagram: husband 0.1 Person isMarried: Boolean gender: String age: int...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write OCL for the following class diagram: husband 0.1 Person isMarried: Boolean gender: String age: int getAge(): int Wife 0.1 employee 0. employer 1 Company Location: String (a) The age of each employee in a company is less than 60 (1 mark) (b) A person is either male or female (1 mark) (c) The company ABC is located in Dubai (1 mark) (d) Each company has some employees (there is no company without employees) (1 mark) (e) The married person must be more than 18 years old (15 marks) (t) If a male person is married, then he must have a wife (15 marks) (g) Write a pre and post-condition for the getAge() method in the Person class (1 mark) Paragraph Y B EET Write OCL for the following class diagram: husband 0.1 Person isMarried: Boolean gender: String age: int getAge(): int Wife 0.1 employee 0. employer 1 Company Location: String (a) The age of each employee in a company is less than 60 (1 mark) (b) A person is either male or female (1 mark) (c) The company ABC is located in Dubai (1 mark) (d) Each company has some employees (there is no company without employees) (1 mark) (e) The married person must be more than 18 years old (15 marks) (t) If a male person is married, then he must have a wife (15 marks) (g) Write a pre and post-condition for the getAge() method in the Person class (1 mark) Paragraph Y B EET
Expert Answer:
Answer rating: 100% (QA)
a The age of each employee in a company is less than 60 Object Constraint Language context Employee ... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
Chose two scenes from the movie "Get Out" and discuss how suspense is created? what horror elements are used? and what fine arts elements are used to create these affects ?
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
ABC Insurance Company has issued a commercial package policy to the Henderson Company. ABC recently discovered that company executives misrepresented important information about the business to...
-
A single-turn rectangular loop of width W and length L moves parallel to its length with a speed v. The loop moves from a region with a magnetic field B(vector) perpendicular to the plane of the loop...
-
The unadjusted trial balance of Recessive Interiors at January 31, 2016, the end of the year, follows: The data needed to determine year-end adjustments are as follows: a. Supplies on hand at January...
-
Compute the value of the chi-square statistic. Exercises 1015 refer to the following data: Anthropologists can estimate the birthrate of an ancient society by studying the age distribution of...
-
Create a context-level diagram for billing in a dental office. External entities include the patients and insurance companies.
-
Examine the analysis provided below. (a) Select your own imaginary / hypothetical engineering project example with the same structure as below (e.g. 5 yr horizon with 0% to 50% rate assumptions. What...
-
Questions : How can you provide Acme with more space in their facility to accommodate growth in the short term? 2. From an operational aspect how can Acme overcome the issues of lost online sales to...
-
In todays connected world, online reviews can make or break a business, large or small. Customers can easily post their experiences to online sites such as Yelp for other customers to read. Or they...
-
H igh and low level of activity last year was 5 7 6 0 0 units produced in April and 1 9 2 0 0 units produced in December. Machine maintenance costs were $ 4 9 9 2 0 in April and $ 1 9 2 0 0 in...
-
How to implement this?def nearest_bee(self): """Return the nearest Bee in a Place that is not the HIVE, connected to the ThrowerAnt's Place by following entrances. This method returns None if there...
-
If you extracted 50 mL of juice from your citrus fruit and you took 20 mL to prepare your fruit juice solution, how much ascorbic acid in mg does an entire fruit contain? Show your calculations. In...
-
Dawson Toys, Limited, produces a toy called the Maze. The company has recently created a standard cost system to help control costs and has established the following standards for the Maze toy:...
-
Putting a clear plastic sheet over a swimming pool helps keep the water warm during dry weather. Explain
-
Given the functions f(x) (a) Let h(x) = - f(x) = cos(5x+7) and g(x)=sin(2-3x). find h'(x). 3 g(x) (b) Let k(x)=f(x) g(x), find the 4th derivative of k(x) by Leibniz's rule.
-
On 1 July 2021, Croydon Ltd leased ten excavators for five years from Machines4U Ltd. The excavators are expected to have an economic life of 6 years, after which time they will have an expected...
-
Suppose that we are working for an online service that provides a bulletin board for its users. We would like to give our users the option of filtering out profanity. Suppose that we consider the...
-
Rewrite the Dog class given in Listing 5.1 by utilizing the information and encapsulation principles described in Section 5.2. The new version should include accessor and mutator methods. Also define...
-
Sudoku is a popular logic puzzle that uses a 9 by 9 array of squares that are organized into 3 by 3 subarrays. The puzzle solver must fill in the squares with the digits 1 to 9 such that no digit is...
-
In an audit of a corporation that has a bond issue outstanding, the trust indenture is reviewed and confirmation as to the issue is obtained from the trustee. List eight matters of importance to the...
-
Robertson Company had accounts receivable of \(\$ 200,000\) at December 31, 200X, and had provided an allowance for uncollectible accounts of \(\$ 6,000\). After performing all normal auditing...
-
Elizabeth Cole, the senior auditor-in-charge of the audit of Thorne Company, a small manufacturer, was busy writing the audit report for another engagement. Accordingly, she sent Martin Joseph, a...
Study smarter with the SolutionInn App