Question: 1.(10 pts.) Given the Geometricobject and Triangle classes below: public class Geometricobject ( private String color whitei private boolean filled; private java.util.Date dateCreated: /*C public
1.(10 pts.) Given the Geometricobject and Triangle classes below: public class Geometricobject ( private String color "white"i private boolean filled; private java.util.Date dateCreated: /*C public Geometricobject) Construct a default geometric object/ datecreated new java.util.Date) public class Triangle extends Geometricobject And the following declarations. Triangle tri 1 = new Triangle (); Geometricobject gol new Geometricobject O: circle all the Boolean expressions that are true below. i) (tril instanceof Geometricobject) ii) (gol instanceof GeometricObject) iii) (tril instanceof Triangle) iv) (gol instanceof Triangle) b) Given the declaration of tril above, can the following statement be compiled? not? GeometricObject go2 = tril
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
