subject

Define a class named document that contains an instance variable of type string named text that stores any textual content for the document. create a method named tostring that returns the text field and also include a method to set this value. next, define a class named email that is derived from document and includes instance variables for the sender , recipient , and title of an email message. implement appropriate accessor (get) and mutator (set) methods. for example get and set method for sender variable. the body of the email message should be stored in the inherited variable text . redefine the tostring method to concatenate all text fields. similarly, define a class named file that is derived from document and includes a instance variable for the pathname . the textual contents of the file should be stored in the inherited variable text . redefine the tostring method to concatenate all text fields. finally, create several sample objects of type email and file in your main method. test your objects by passing them to the following subroutine that returns true if the object contains the specified keyword in the text property. public static boolean containskeyword(document docobject, string keyword) { if (docobject.(keyword,0) > = 0) return true ; return false ; }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
question
Computers and Technology, 22.06.2019 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Refer to the figure and match the theorem that supports the statement.1.if chords are =, then arcs are =.if bc = de, then arc bc = arc de2.if arcs are =, then chords are =.if arc bc = arc de, then bc = de3.diameters perpen
Answers: 3
You know the right answer?
Define a class named document that contains an instance variable of type string named text that stor...
Questions
question
English, 17.04.2020 18:47
question
Chemistry, 17.04.2020 18:47
question
Spanish, 17.04.2020 18:47
Questions on the website: 13722367