
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
![222CCS-4 Object Oriented Programming
Assignment - II
Write a Java program for the following Class Diagram.
Document
-authors : String )
-date : Date
+getAuthors() : Stringl)
+addAuthor(name) : void
+getDate() : date
Book
EMail
-title : String
-subject : String
-to : Stringl]
+getSubject() : String
+getTo(): String[)
+getTitle() : String
Instructions:
1. This java program is for an application that stores the author (Writer) data of
some books and emails.
2. getAuthors() method get the list of authors and store it in a String array.
3. addAuthors(0 method is used to add an author anytime for book or email.
4. getDate() method get the date of the book or email.
5. getTitle() method can be used to get the title of the book.
6. getSubject() method is used to get the Subject of the email.
7. getTo() method is used to get the information about the mail to whom it is sent.
8. All get methods need to return the values in the corresponding instance
variables.
9. Scanner class can be used to set the data for the variables. The programmer can
give his/her own methods to set the instance variables.](https://content.bartleby.com/qna-images/question/ae6c7662-a1bf-466e-9e6f-97db0eb0e35c/8e29129e-ab70-4c25-be9f-194a2c7e8f36/iztjz05_thumbnail.jpeg)
Transcribed Image Text:222CCS-4 Object Oriented Programming
Assignment - II
Write a Java program for the following Class Diagram.
Document
-authors : String )
-date : Date
+getAuthors() : Stringl)
+addAuthor(name) : void
+getDate() : date
Book
EMail
-title : String
-subject : String
-to : Stringl]
+getSubject() : String
+getTo(): String[)
+getTitle() : String
Instructions:
1. This java program is for an application that stores the author (Writer) data of
some books and emails.
2. getAuthors() method get the list of authors and store it in a String array.
3. addAuthors(0 method is used to add an author anytime for book or email.
4. getDate() method get the date of the book or email.
5. getTitle() method can be used to get the title of the book.
6. getSubject() method is used to get the Subject of the email.
7. getTo() method is used to get the information about the mail to whom it is sent.
8. All get methods need to return the values in the corresponding instance
variables.
9. Scanner class can be used to set the data for the variables. The programmer can
give his/her own methods to set the instance variables.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- complete the missing code. public class Exercise09_04Extra { public static void main(String[] args) { SimpleTime time = new SimpleTime(); time.hour = 2; time.minute = 3; time.second = 4; System.out.println("Hour: " + time.hour + " Minute: " + time.minute + " Second: " + time.second); } } class SimpleTime { // Complete the code to declare the data fields hour, // minute, and second of the int type }arrow_forwardJAVA PROGRAMMING LANGUAGE PLEASE. Convert the following UML to code in the image given below.arrow_forward8) Now use the Rectangle class to complete the following tasks: - Create another object of the Rectangle class named box2 with a width of 100 and height of 50. Note that we are not specifying the x and y position for this Rectangle object. Hint: look at the different constructors) Display the properties of box2 (same as step 7 above). - Call the proper method to move box1 to a new location with x of 20, and y of 20. Call the proper method to change box2's dimension to have a width of 50 and a height of 30. Display the properties of box1 and box2. - Call the proper method to find the smallest intersection of box1 and box2 and store it in reference variable box3. - Calculate and display the area of box3. Hint: call proper methods to get the values of width and height of box3 before calculating the area. Display the properties of box3. 9) Sample output of the program is as follow: Output - 1213 Module2 (run) x run: box1: java.awt. Rectangle [x=10, y=10,width=40,height=30] box2: java.awt.…arrow_forward
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY