Write a Java class NODE that represent a shape that may be a line, rectangle or a circle. The class must store the dimensions of the shape and the type as integer.
Override the method toString () to convert the shape to a string which show all the information
Write the class STACK which implemented as linked list of nodes with all functions Push, POP and Print.
Write the main and use the basic operations of the STACK to push and pop shapes.
HW1.java
Class NODE {
…….
}
Class STACK {
…..
}
Public class HW1 {
Public static void main () {
}|
}
ازا ممكن ساعدونا بحل هادا السؤال
ولكم جزيل الشكر