Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step by Step Solution
★★★★★
3.45 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
a The age of each employee in a company is less than 60 Object Constraint Language context Employee ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started