{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

assign_3_Solution - CSCI3007 OCL Tutorial Background The...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCI3007 OCL Tutorial Background The Royal and Loyal (R&L) company handles loyalty programs for companies that offer their customers various kinds of bonuses (E.g., bonus points, air miles, reduced rates, a larger car for the rate of a smaller one in a Car Hire company, extra or better service on an Airline etc.). Anything a company is willing to offer can be a service rendered in a loyalty program. The central class in the UML model, below, is LoyaltyProgram. A system that administers a single loyalty program will contain only one object of this class. A company that offers its customers a membership in a loyalty program is called a ProgramPartner. More than one company can enter into the same program. In such a case, customers who enter the loyalty program can profit from services rendered by any of the participating companies. Every customer of every program partner can enter the loyalty program by filling in a form and obtaining a membership card. The objects of class Customer represent people who have entered the program. The membership card, represented by the class CustomerCard, is issued to one person. Card use is not checked so the card could be used as a family or business card. Most loyalty programs allow customers to save bonus points. Each individual program partner decides when and how many bonus points are allotted for a certain purchase. Saved bonus points can be used to “buy” specific services from one of the program partners. To account for the bonus points that are saved by the customer, every membership can be associated with a LoyaltyAccount. Various transactions on this account are possible. For example, the loyalty program “Silver and Gold” has 4 program partners: a supermarket, a chain of petrol stations, a car rental service and an airline: At the supermarket a customer earns 5 bonus points for £1 spent above £10: bonus points can be redeemed for items buyable only with bonus points The petrol stations offer a discount of 5% on every bill The Car Hire company offers 20 bonus points for every £50 spent Customers can save bonus points for free flights with the Airline. For every normal flight the airline offers 1 bonus point for each 15 miles of flight.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern