100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Assignment £2.99
Add to cart

Other

Assignment

 6 views  0 purchase

Assignment 2

Preview 3 out of 16  pages

  • November 24, 2024
  • 16
  • 2019/2020
  • Other
  • Unknown
All documents for this subject (12)
avatar-seller
aj5314340
Unit 15-Object Oriented Programming

Assignment 2




1

,Contents

P1...........................................................................................................................................................3
Task 1a)..............................................................................................................................................3
OOP Features.................................................................................................................................3
Task 1b)..............................................................................................................................................4
OOP Advantages and Disadvantages.............................................................................................4
P2...........................................................................................................................................................4
Task 2a)..............................................................................................................................................4
OOP Tools and Techniques............................................................................................................4
Task 2b)..............................................................................................................................................5
Task 2c)..............................................................................................................................................7
Task 2d)..............................................................................................................................................7
Four OOP Programming Languages...............................................................................................7
M2.........................................................................................................................................................8
Task 3)................................................................................................................................................8
OOP Tools and Techniques and Functions.....................................................................................8
M1.......................................................................................................................................................11
Task 4a)............................................................................................................................................11
Encapsulation, Inheritance and Polymorphism............................................................................11
Task 4b)............................................................................................................................................12
Encapsulation, Inheritance and Polymorphism Images...............................................................12
Task 4c)............................................................................................................................................13
D1........................................................................................................................................................13
Task 5)..............................................................................................................................................13
References...........................................................................................................................................15




2

, P1
Task 1a)
OOP Features
In this task I will describe each OOP feature below.

Reusable units of programming code/logic
Reusable units of program code/logic refer to units and code that can be used again and again. For
example, using the code to add two numbers and copying it but then changing it to allow two
numbers to be subtracted. This can be useful as it allows programmers to use code/logic repeatedly
and thus programmers can finish work quickly and finish the work to the deadline. 1

Data Abstraction
Data Abstraction is what handles confusion by hiding data that is not required from the user of the
program. This enables the users to implement more difficult logic with the abstraction without
seeing the or thinking about the difficulty. 2 An example of data abstraction is an ATM , as the ATM
hides the operations or the code that is executed while an event happens e.g. withdrawing cash.

Modularity
Modularity is when the program is broken into a set of modules. This is to make sure that the
program isn’t difficult to run or understand for the users. 3 For example, a banking program can have
three or more different modules like a creating an account, depositing/withdrawing, printing
statement, etc.

Classes
is the template meaning of methods and variables in an object? An object is a class, it has real life
values instead of variables. Classes can have subclasses which combine all but sometimes some
features of a class. In correlation to each subclass the class becomes the superclass. Subclass can
have their own methods and variables which is not part of the super class. Class, subclass and
superclass are part of the class hierarchy. 4 An example of a class in a school register system is an
student.

Methods
is a variable in relation to class. The method has the meaning of the behaviour of the objects that are
made from the class. So, in other words, is an action that an object can perform. When method and
class is combined it is called binding.5 An example of method is the ability of the class student is to
take an exam.

1
Jones, L. (2016). Programming Assignment Help: Tool for Good OOP Projects in UK. [online] Medium. Available at:
https://medium.com/@lilyjones12/programming-assignment-help-tool-for-good-oop-projects-in-uk-5d5776117fa5#:~:text=Discrete
%20code%3A

2
Stackify. 2020. OOP Concept For Beginners: What Is Abstraction?. [online] Available at:
https://www.google.com/amp/s/stackify.com/oop-concept-abstraction/amp/
3
Tutorialspoint.com. 2020. OOAD - Object Oriented Principles - Tutorialspoint. [online] Available at:
https://www.tutorialspoint.com/object_oriented_analysis_design/ooad_object_oriented_principles.htm#:~:text=may%20be
%20used.-,Modularity,cohesive%20and%20loosely%20coupled%20modules.%E2%80%9D
4
WhatIs.com. 2020. What Is Class? - Definition From Whatis.Com. [online] Available at:
<https://whatis.techtarget.com/definition/class?amp>
5
Study.com , 2020. Object-Oriented Programming: Objects, Classes & Methods. [online] Available at:
https://study.com/academy/lesson/oop-object-oriented-programming-objects-classes-interfaces.html#transcriptHeader

3

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller aj5314340. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £2.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

50064 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£2.99
  • (0)
Add to cart
Added