LogoLogo
    Logo
    • TutoringSchools
    1. Home
    2. IB
    3. Computer Science (CS)
    4. Questions

    The supermarket chain wants to use this OOP simulation to experiment with different ways of organizing their check-out system. For example, it is possible to have different check-out counters such as cash-only or card only, or to have check-out counters for ten items or fewer.

    Question
    SLPaper 2

    The supermarket chain wants to use this OOP simulation to experiment with different ways of organizing their check-out system. For example, it is possible to have different check-out counters such as cash-only or card only, or to have check-out counters for ten items or fewer.

    It is also possible to have one line that serves a number of check-out counters.

    1.

    Describe two advantages of using libraries of classes.

    [4]
    Verified
    Solution

    Award 4 marks maximum Saves development time;
    Since classes and their methods do not need to be rewritten;

    Promotes abstraction; 2 marks
    Because reusable code exists that functions without knowledge of internal working;

    Libraries contain error-free / robust code; 2 marks because it has been used and tested many times;

    Promotes efficiency / organization;  <marks> 2 marks </marks>
    

    As code will be shorter / easier to read / develop;

    Familiarity with libraries;  <marks> 2 marks</marks>
    

    Allow for easier maintenance / modification;

    2.

    Define the term inheritance.

    [2]
    Verified
    Solution

    Award maximum 2 marks> A new class is derived from an existing class; 1 mark The new class inherits all variables/data/properties and methods/behaviours of the other class; 1 mark
    The derived class is called a subclass/child, and the original is called a superclass/parent; 1 mark

    3.

    Outline two reasons why the use of multiple programming teams in different locations may be problematic when developing an integrated software solution.

    [4]
    Verified
    Solution

    Award 4 marks maximum

    Teams may be located in different countries;
    therefore have communication issues;
    due to different languages;
    or different time zones;
    inability to discuss face-to-face;
    Problems with different conventions (e.g. date format);
    Managing the teams in different locations may be problematic (allow example);
    Teams may not collaborate well due to personality issues;
    Development time might increase;
    Due to time lags between communications;

    4.

    Explain one advantage of the OOP feature “inheritance” with reference to this scenario.

    [3]
    Verified
    Solution

    Award 3 marks maximum

    Note: to a certain extent mixing and matching can take place

    It promotes code reuse; 1 mark because the superclass POSline;
    holds common data and actions that are shared by all newly developed classes;

    It reduces maintenance overhead; 1 mark because you only have to update the superclass;
    in this case POSline;

    allows extensibility / ability to create other classes easily; 1 mark specific types of check-out can be created;
    reducing development time / costs / testing;

    Sign up for free to view this answer

    Still stuck?

    Get step-by-step solutions with Jojo AI

    FreeJojo AI

    Want more practice questions for Computer Science (CS)?

    Related topics


    Footer

    General

    • About us
    • Mission
    • Tutoring
    • Blog
    • State of learning surveyNew

    • Trustpilot
    • Contact us
    • Join us We're hiring!

    Features

    • Jojo AI
    • Questionbank
    • Study notes
    • Flashcards
    • Test builder
    • Exam mode
    • Coursework
    • IB grade calculator

    Legal

    • Terms and conditions
    • Privacy policy
    • Cookie policy
    • Trust Center

    IB

    • Biology (New syllabus)
    • Business Management
    • Chemistry (New syllabus)
    • Chinese A Lang & Lit
    • Chinese B
    • Computer Science (CS)
    • Design Technology (DT)
    • Digital Society (DS)
    • Economics
    • English B
    • View more...
    Logo

    © 2022 - 2025 RevisionDojo (MyDojo Inc)

    RevisionDojo was developed independently of the IBO and as such is not endorsed by it in any way.

    RedditInstagramTikTokDiscord
    GDPR compliant