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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:50, Emptypockets451
You need to design a circuit that implements the functions in the following table: s0 s1 function0 0 a + 10 1 a – b1 0 a + b1 1 a – 1s0 and s1 are 1-bit control inputs to select the function of the circuit. inputs a and b are 4-bitnumbers in 2s complement form. the output is also a 4-bit number in 2s complement form. you are allowed to use only one ttl 7483 4-bit adder to implement all the functions. but anynumber of other components (except the adder) can be used. hint: design a combinational logic circuit to modify the input b and the “carry input” of theadder depending on the control inputs s0 and s1.important: lab grade will depend on the working of the circuit & will be checked of by your labinstructor.1. is the output valid for the following input combinations: a. s0 = 0, s1 = 0, a = 7, b = 3? b. s0 = 0, s1 = 1, a = 7, b = 3? c. s0 = 1, s1 = 0, a = -4, b = -5? d. s0 = 1, s1 = 1, a = -8, b = 6? 2. what is the range of inputs (for both a and b) that will produce the valid output for all the functions?
Answers: 3
image
Computers and Technology, 23.06.2019 09:30, jason9394
Facial expressions and gestures are examples of messages.
Answers: 3
image
Computers and Technology, 23.06.2019 09:50, tatumleigh04
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
image
Computers and Technology, 23.06.2019 14:30, rose6038
Select the correct answer. peter has launched a website that features baby products. however, clients often find they are unable to access the website because the server is down. which feature of cybersecurity should peter focus on for his website? a. data authenticity b. data privacy c. data availability d. data integrity e. data encryption
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 in other subjects:

Konu
Mathematics, 05.05.2020 15:54
Konu
Physics, 05.05.2020 15:54