

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
OOP EXERCISES AND ASSIGNMENT FOR STUDENTS
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


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
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;