OOP EXERCISES AND ASSIGNMENT FOR STUDENTS, Assignments of Object Oriented Programming

OOP EXERCISES AND ASSIGNMENT FOR STUDENTS

Typology: Assignments

2020/2021

Available from 05/08/2023

daniyalrosli
daniyalrosli 🇲🇾

3 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EXERCISES
DECEMBER 2019 ( PART B : QUESTION 1)
a) What is the meaning of abstraction in Object-oriented programming?
(2 marks)
Abstraction is hiding the detailed implementation to the users of how things would be
done, and only show the necessary features of what should be done.
b) Protected, private and public are access modifiers in Object-oriented Programming.
Describe each modifier.
(3 marks)
Refer to the table given in slides
pf3

Partial preview of the text

Download OOP EXERCISES AND ASSIGNMENT FOR STUDENTS and more Assignments Object Oriented Programming in PDF only on Docsity!

EXERCISES

DECEMBER 2019 ( PART B : QUESTION 1)

a) What is the meaning of abstraction in Object-oriented programming?

(2 marks)

Abstraction is hiding the detailed implementation to the users of how things would be done, and only show the necessary features of what should be done.

b) Protected, private and public are access modifiers in Object-oriented Programming. Describe each modifier.

(3 marks)

Refer to the table given in slides

JUNE 2019 ( PART B : QUESTION 2)

QUESTION 2

public class LongJump { private int athleteID; private String athleteName; private String teamCode; private double [ ] lengthJump;

// NORMAL CONSTRUCTOR Public LongJump (int aid, String an, String tc, double lj) { athleteID = aid; athleteName = an; teamCode = tc; lengthJump = lj; }

//MUTATOR public void setData (int aid, String an, String tc, double lj) { athleteID = aid;