37 title = name;
38 }
39
40 public void SetDescription(String desc) {41 description = desc;42 }43
44
45
11 private static Scanner input = new Scanner(System.in);
12 private static ProjectBook test = new ProjectBook();
13 private static int result = -1;
14 public static void main(String[] args) {1516 do{17 System.out.println("What would you like to do? \n 0: View Basic Notebook info \n 1: Create notebook \n 4: exit");18 System.out.println("input: ");19 result = Integer.parseInt(input.nextLine());20 mainOptionSelection();21 System.out.println("\n\n");2223 journalFormatter(10);24 } while(result != 4);25 clearScreen();26 }27
28 private static void clearScreen() {
29 System.out.println("\033c");
25 clearScreen();
26 }
27
28 private static void clearScreen() { 29 System.out.println("\033c");30 System.out.flush(); 31 }32
33 private static void mainOptionSelection() {
34 switch(result) {
30 System.out.flush();
31 }
32
33 private static void mainOptionSelection() {34 switch(result) {35 case 0:36 System.out.println("notebooks: \n" + test.getTitle() + ": " + test.getDescription());37 case 1: 38 }39 }40 public static void journalFormatter(int entryID) {
41 System.out.println(test.getTitle());
42 System.out.println("-----------------------------------------------------");
37 case 1:
38 }
39 }
40 public static void journalFormatter(int entryID) {41 System.out.println(test.getTitle());42 System.out.println("-----------------------------------------------------");43 System.out.println(test.getDescription());44 System.out.println("\n\n");45 }46}
This method does not have any documentation.
Consider adding a documentation comment to explain its use.
While it may seem like the usage of a method is perfectly obvious, any consumers of your API may not be able to pick up on certain details.
This method appears to return an address string based on its name and the return type, but it is hard to say anything further about it. We neither know if the address will be formatted in a special way nor are we given any useful information regarding the returned value.
String getAddress() {
// ...
}
Provide a detailed description of what the method does.
/**
* Returns the address in 3 line format,
* with street address on line 1, area/city on line 2
* and state and country as well as postal code on line 3.
*/
String getAddress() {
// ...
}