Question: Question B1 A note-taking application has been written to allow people to record notes and search for given notes by keyword. Some code has already


Question B1 A note-taking application has been written to allow people to record notes and search for given notes by keyword. Some code has already been written for this application, shown below. The class Note records subject and contents for a new text note. The includes method is incomplete. a) Complete the body of the includes method. The method should return true if either the subject or the text of the note contains the text parameter. [8 marks] A separate class, Journal, will maintain a list of Note objects together with the name of the person owning the journal. The class has been partially written, as follows: b) Write a constructor method for the Journal class. New Journal objects should have a name initialised using a parameter to the constructor method, and an empty list of notes. [5 marks] c) Write a method, addNote, to add a note object to the notes ArrayList of a Journal Object. [4 marks] d) The notescontaining method will search all notes in the list for the given text and return a count of the number of notes which contain the text either in the subject or the contents. Complete the body of the notescontaining method. [8 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
