Turn on thread page Beta
    • Thread Starter
    Offline

    11
    ReputationRep:
    When we went though this is class i had 0 clue and now I could do with some help on this example.
    Also if you can explain what Abstraction and automation actually are/mean that would be very helpful


    A holiday tour business wants to create a new computer system. They offer 30 different tours every year, each of which can have up to 50 people on it. The tour company organises the travel and hotel arrangements and lays on a number of excursions. The company needs to organise tour guides to accompany its customers and manage all of the payments from customers and to suppliers.

    These are the questions I'm struggling with to do with the above statement (and why I'm struggling)

    a) Explain how you could use abstraction by generalisation or categorisation to break this problem down
    - I know this definition of abstraction by generalisation/categorisation: Reducing problems by categorising similar aspects of a problem into a hierarchy. But I cant understand what it means to do what similar parts and how does that solve reduce the number of problems?


    b)Produce a hierarchy chart to show how you could decompose this problem
    - Whats a hierarchy chart

    This whole topic is weird and confusing thanks for reading/helping
    Online

    19
    ReputationRep:
    UML provides a well established hierarchy diagram and is worth learning.

    https://en.wikipedia.org/wiki/Class_diagram

    You only need to remember three relationships.

    Generalisation is the "is a" relationship. So in your example the tour company offers different Tours. Tours may be specialised so you might have a Safari Tour, a Polar Tour and a City Tour, each of which specialise the Tour class. A Safari Tour "is a" Tour. In code, this is inheritance.

    To be honest - I have never heard of categorisation. However, in UML the other main relationship is "has a" which is the composition relationship. So in your example, a Tour "has a" person on it and in this particular example, there is a one-to-many relationship between Tour and Person i.e. one Tour - lots of Persons. The might be represented in code as a Tour class having an attribute or member variable that is an array of Person objects.

    The final relationship is one of dependency. In your example, you need to assign tour guides to groups of people. A tour guide isn't a person (Generalisation), nor does a tour guide "have a" person (composition), but a tour guide does have one to many dependency on one or more Person objects. In your code, this might be a dictionary variable in the TourCompany class that uses the TourGuide as the key and an array of Person objects as the value.

    The best way to start with hierarchy charts is to define your entities which is usually anything that is a noun. So we have Person, Tour, TourCompany, TourGuide and so on. Then just draw some lines as you see them connected. Feel free to use the UML notation. It really is pretty simple and helps clarify much.

    Good luck!
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: November 5, 2016
The home of Results and Clearing

1,679

people online now

1,567,000

students helped last year

University open days

  1. Sheffield Hallam University
    City Campus Undergraduate
    Tue, 21 Aug '18
  2. Bournemouth University
    Clearing Open Day Undergraduate
    Wed, 22 Aug '18
  3. University of Buckingham
    Postgraduate Open Evening Postgraduate
    Thu, 23 Aug '18
Poll
A-level students - how do you feel about your results?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.