|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNotebook
public class Notebook
A class to maintain an arbitrarily long list of notes. Notes are numbered for external reference by a human user. In this version, note numbers start at 0.
Constructor Summary | |
---|---|
Notebook()
Perform any initialization that is required for the notebook. |
Method Summary | |
---|---|
boolean |
modifyNote(String target,
String replacement)
Modifica nella lista la nota che inizia con la stringa fornita come primo parametro e la sostituisce con la stringa fornita come secondo parametro; il valore di ritorno indica se la nota è stata modificata o meno; |
int |
numberOfNotes()
|
boolean |
removeNote(String target)
Rimuove dalla lista la nota che inizia con la stringa fornita come parametro; il valore di ritorno indica se la nota è stata eliminata o meno; |
void |
showNote(int noteNumber)
Show a note. |
boolean |
showNote(String target)
Individua una nota ricercando, all'interno delle note memorizzate, la prima che inizia con la stringa fornita come parametro (Utilizzare la documentazione delle classi String e ArrayList per progettare questo e i succcessivi metodi); il valore di ritorno indica se la nota è stata trovata o meno; |
void |
sortNotes()
Ordina le note in ordine alfabetico. |
void |
storeNote(String note)
Store a new note into the notebook. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Notebook()
Method Detail |
---|
public boolean modifyNote(String target, String replacement)
target
- The string (note) to be replacedreplacement
- The replacement string (note)
public int numberOfNotes()
public boolean removeNote(String target)
target
- the string (note) to search for
public void showNote(int noteNumber)
noteNumber
- The number of the note to be shown.public boolean showNote(String target)
target
- the string (note) to search for
public void sortNotes()
public void storeNote(String note)
note
- The note to be stored.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |