0% found this document useful (0 votes)
23 views1 page

Java Assignment: OOP Concepts & Arrays

Uploaded by

danielkaimugul33
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

Java Assignment: OOP Concepts & Arrays

Uploaded by

danielkaimugul33
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JAVA ASSIGNMENT 2: SUBMIT BEFORE 05/11/2025

SUBMIT YOUR WORK AS A PDF FILE


1. Write a java program that implements the following concepts, indicate with a comment
in your code how you have implemented the concepts:
i. Classes
ii. Objects
iii. Inheritance
iv. Polymorphism
v. Encapsulation
vi. Abstraction

2. In Java, polymorphism can be of three types:


i. Function Overloading: Function overloading is using a single function name to
perform different types of tasks.

ii. Function Overriding: Function overriding is changing the behavior of a function that
is derived from the base class using inheritance.

Provide an example of a java program for each case

3. Demonstrate multidimensional array

4. Demonstrate how constructors can take parameters and use them to initialize
attributes.

You might also like