Question: please help me with this java programming past paper 4. Inheritance. Abstract Classes and Interfaces (a) You are asked to write a series of classes

please help me with this java programming past paper
 please help me with this java programming past paper 4. Inheritance.

4. Inheritance. Abstract Classes and Interfaces (a) You are asked to write a series of classes for storing document information for an i. Define an abstract Document class to store the following attributes: filename, ii. Define a WordDocument class that builds upon your previous class but in- office suite of applications. author, date created and date last modified. cludes the following additional String attributes: title, subtitle, body, header iii. Define a SpreadsheetDocument class that extends the Document class 13] and footer and stores a title and a two dimensional array of Cell objects. The Cell class is defined like so: public class Cell Object value; public Cell (Object value) this.value value; public Object getValue) return value; public void setValue (Object value) this.value value; (b) Two interfaces are required in the office suite. One indicates that a document can be printed, the other indicates a document can be saved. i. Define an interface called Printable that would ensure that any class that implements the Printable interface contains a print method. You may 12] ii. Define an interface called Saveable that would ensure that any class that im plements the Saveable interface contains a save method. The save method will take a single String parameter that holds the filename and returns a single 12] (c) With reference to your answers to (a) and (b), demonstrate how you would build a document class that can be saved and printed. You do not need to provide complete assume the print method has no parameters and no return value value indicating whether the save was successful. implementations of any method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!