Question: is my answer correct??? fix the code and provide the run screen import java.util.Date; public class Document { private String[] authors; private Data date; int

is my answer correct??? fix the code and provide the run screen
import java.util.Date;
public class Document {
private String[] authors;
private Data date;
int index;
public Document(){
authors =new String[50];
index=0;
}
public String[] getAuthors() {
return authors;
}
public void addAuther(String name);
{
authors[index]=name;
index++;
}
public Date getDate(){
return date;
}
public class Book extends Document{
private String title;
public String getTitle(){
return title;
}
public class Email extends Document{
private string subject;
private String []to;
public String[] getSubject() {
return subject;
}
public String[]getTo()
{return to;
}
}
public static void main (String[]args)
{
Book book=new Book();
book.setTitle("the");
book.setAuther("ghaida");
Email email=new Email();
email.setAuthor("gh");
email.setSubject("order");
email.setTo("Jeeee");
System.out.println("Subject:"+email.getSubject());
System.out.println("Dear"+email.to+","+"Thank you for your purchase on the book"+book.getTitle()+"by"+book.getAuthor()+". we are from" +email.getAuthor()+" Happy raeding!");}
is my answer correct??? fix the code and provide the run screen

Q2. Write a java program for the UML diagram given

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!