Question: Ques tion Number 5 [4+4]: Consider the following Class diagram of University Course Scheduler System and use Object Constraint Language (OCL) to write the invariants

QuesQuestion Number 5 [4+4]: Consider the following Class diagram of University Coursetion Number 5 [4+4]:

  1. Consider the following Class diagram of University Course Scheduler System and use Object Constraint Language (OCL) to write the invariants conditions mentioned below
  2. Students GPA must always be higher than 2, and ensures that the instructor is being paid
  3. Students tuition was paid before registering for a course and that the operation registerStudent returned true
  4. Ensures that a student was registered and the number of students in a course has increased by 1
  5. Ensures a teacher of a high-level course has an appropriate salary.

  1. Consider the following UML Class diagram of Car Rental System, briefly explain the class diagram in your own words. Also, write the following OCL expression:
  2. Write an invariant to restrict BlackListed people from renting cars. Also, write an OCL expression to initializes premium attribute of Customers class with false value.
  3. For Customer class write OCL expression which describes that premium members get a 30% discount while nonpremium members get 15% if they have at least rented high category cars six times while the rest of the customers get no discount at all.
  4. Write OCL expression for query operation that returns true if the car on which the operation is executed is the most popular in the rental system.
  5. Write OCL expression for an operation which describes the business logic behind the creation of a new rental (customer) in the car rental system.

Question Number 5 [4+41: a) Consider the following Class diagram of "University Course Scheduler System and use Object Constraint Language (OCL) to write the invariants conditions mentioned below: Course University namer String tuition: float 1. title: String roomAssignment: String textBook: String course Level: int register Students Student boolean getHonors Students Studento" 1 courses 0.. JpreRegs 1. students 1 Instructor Teacher 1) Write an invariant to restrict "BlackListed" people from renting cars. Also, write an OCL expression to initializes premium attribute of Customers class with "false" value. ii) For Customer class write OCL expression which describes that premium members get a 30% discount while nonpremium members get 15% if they have at least rented high category cars six times while the rest of the customers get no discount at all. iii) Write OCL expression for query operation that returns true if the car on which the operation is executed is the most popular in the rental system. iv) Write OCL expression for an operation which describes the business logic behind the creation of a new rental (customer) in the car rental system. Student GPA float dateOfBirth: Date yearOrGraduation: Int tuition Paid:boolean name: String salary: float 1) Student's GPA must always be higher than 2, and ensures that the instructor is being paid ii) Student's tuition was paid before registering for a course and that the operation register Student returned true il) Ensures that a student was registered and the number of students in a course has increased by 1 iv) Ensures a teacher of a high-level course has an appropriate salary. ************** Good Luck***************** b) Consider the following UML Class diagram of "Car Rental System," briefly explain the class diagram in your own words. Also, write the following OCL expression: Order Quote value: Integer Car regnum: String low 0.1 0.1 AssignedCarGroup 1 Carroup 1. carroup Category: Stringar Group 1." Branch branch address: String 01 car 1 pickUpBranch 1 drop Branch Drop Off 0. drop OfRental 0.- PickUp pickup Rental Rental id: String price: Real state String 0. endingDate: Date rental Agreement starting Date: Date Assigned 1. Drives renta Customer id string name: String 1.thday Date drver keepDate: Date premium: Boolean discount Integer Blacklisted blackstone Date k3 Page 8 of 8 Question Number 5 [4+41: a) Consider the following Class diagram of "University Course Scheduler System and use Object Constraint Language (OCL) to write the invariants conditions mentioned below: Course University namer String tuition: float 1. title: String roomAssignment: String textBook: String course Level: int register Students Student boolean getHonors Students Studento" 1 courses 0.. JpreRegs 1. students 1 Instructor Teacher 1) Write an invariant to restrict "BlackListed" people from renting cars. Also, write an OCL expression to initializes premium attribute of Customers class with "false" value. ii) For Customer class write OCL expression which describes that premium members get a 30% discount while nonpremium members get 15% if they have at least rented high category cars six times while the rest of the customers get no discount at all. iii) Write OCL expression for query operation that returns true if the car on which the operation is executed is the most popular in the rental system. iv) Write OCL expression for an operation which describes the business logic behind the creation of a new rental (customer) in the car rental system. Student GPA float dateOfBirth: Date yearOrGraduation: Int tuition Paid:boolean name: String salary: float 1) Student's GPA must always be higher than 2, and ensures that the instructor is being paid ii) Student's tuition was paid before registering for a course and that the operation register Student returned true il) Ensures that a student was registered and the number of students in a course has increased by 1 iv) Ensures a teacher of a high-level course has an appropriate salary. ************** Good Luck***************** b) Consider the following UML Class diagram of "Car Rental System," briefly explain the class diagram in your own words. Also, write the following OCL expression: Order Quote value: Integer Car regnum: String low 0.1 0.1 AssignedCarGroup 1 Carroup 1. carroup Category: Stringar Group 1." Branch branch address: String 01 car 1 pickUpBranch 1 drop Branch Drop Off 0. drop OfRental 0.- PickUp pickup Rental Rental id: String price: Real state String 0. endingDate: Date rental Agreement starting Date: Date Assigned 1. Drives renta Customer id string name: String 1.thday Date drver keepDate: Date premium: Boolean discount Integer Blacklisted blackstone Date k3 Page 8 of 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!