forked from SadeeshaJayaweera/Java-Practical-Codes-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectClass.java
More file actions
39 lines (34 loc) · 1.08 KB
/
Copy pathProjectClass.java
File metadata and controls
39 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
This is the 3rd Part of the Question 10 in the Assignment Regarding Abstract classes and methods
the object code is Project_Main.java
*/
// Abstract base class providing a common interface
public abstract class ProjectClass {
// Common method that all subclasses should implement
abstract void debug();
// Other common methods can be included here if needed
}
// Subclass 1 inheriting from the abstract base class
class Subclass1 extends ProjectClass {
@Override
void debug() {
System.out.println("Debugging Subclass1...");
// Implement debug-specific functionality here
}
}
// Subclass 2 inheriting from the abstract base class
class Subclass2 extends ProjectClass {
@Override
void debug() {
System.out.println("Debugging Subclass2...");
// Implement debug-specific functionality here
}
}
// Subclass 3 inheriting from the abstract base class
class Subclass3 extends ProjectClass {
@Override
void debug() {
System.out.println("Debugging Subclass3...");
// Implement debug-specific functionality here
}
}