x86Cow / javaProjectJournal

Undocumented class found JAVA-D1000
Documentation
Minor
a year agoa year old
Consider adding a doc comment for ProjectBook
 3import java.util.ArrayList;
 4
 5
 6public class ProjectBook { 7    private String title; 8    private String description; 9    private Entry entry = new Entry();10    private ArrayList<Entry> entries = new ArrayList<Entry>();111213    public ProjectBook() {14        title = "unnamed";15        description = "No description";1617        entry = new Entry();18        entries.add(entry);19    }20    21    public ProjectBook(String name, String desc) {22        title = name;23        description = desc;24    }2526    // GETTERS27    public String getTitle() {28        return title;29    }3031    public String getDescription() {32        return description;33    }3435    // SETTERS36    public void setTitle(String name) {37        title = name;38    }39    40    public void SetDescription(String desc) {41        description = desc;42    }434445    46}
Consider adding a doc comment for Entries
 1import java.util.ArrayList;
 2
 3public class Entries { 4    ArrayList<Entry> entries = new ArrayList<Entry>(); 5    public Entries() { 6        for(int i = 0; i < 0; i++) { 7        } 8 9    }10}
Consider adding a doc comment for Entry
 1public class Entry { 2    private String entryName; 3    private String entryMain; 4 5 6    public Entry() { 7        entryName = "unnamed"; 8        entryMain = "no information"; 9        // date10    }1112    public Entry(String name, String main) {13        entryName = name;14        entryMain = main;15    }1617    public String getEntryName() {18        return entryName;19    }20    21    public String getEntryMain() {22        return entryMain;23    }2425    public void setEntryName(String name) {26        entryName = name;27    }2829    public void setEntryMain(String main) {30        entryMain = main;31    }32}
Consider adding a doc comment for Main
 6
 7import java.util.Scanner;
 8
 9class Main{1011    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    }2728    private static void clearScreen() {  29        System.out.println("\033c");30        System.out.flush();  31    }3233    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("-----------------------------------------------------");43        System.out.println(test.getDescription());44        System.out.println("\n\n");45    }46}