levo

Programming

Objects, classes and methods

  • 3 things to know
  • AS Unit 1

Overview

Object in object-oriented programming, class and an object and sending a message to an object.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Distinguish between a class and an object.

Key term

What is an attribute?

Key term

Define encapsulation.

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is an object in object-oriented programming?

    Model answer

    An object is a self-contained software item that holds its own data together with the operations that act on that data, and it usually stands for one real-world thing such as a single customer.

  2. 2

    What is a class?

    Model answer

    A class is a template that defines the attributes and the methods every object of that kind will have, and no data is stored until an object is created from it.

  3. 3

    What is meant by instantiation?

    Model answer

    Instantiation is the creation of one individual object from a class, giving that object its own copy of the attributes the class describes.

  4. 4

    Distinguish between a class and an object.

    Model answer

    A class is the general description written once by the programmer, while an object is one particular item built to that description and holding values of its own.

  5. 5

    What is an attribute?

    Model answer

    An attribute is a data item belonging to an object, such as the name or the balance of a bank account, and every object holds its own value for it.

  6. 6

    What is a method?

    Model answer

    A method is a procedure or function defined inside a class that carries out one of the operations an object can perform, such as paying an amount into an account.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Systems Analysis and Development Approaches
Design, Development and Testing
Implementation and System Security
Programming

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

A check requires a value.
presencerangeformat

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

ANormal data is 12, which should be accepted.
BBoundary data is 1 and 50, which should be accepted.
C0 and 51, just outside the limits, should be rejected.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

One byte is made up of 8 bits.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Programming, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.