Question: I created a book app in Java that tracks the statuses to be read, completed, did not finish and want to read. I ' m
I created a book app in Java that tracks the statuses to be read, completed, did not finish and want to read. Im working on adding a GUI and connecting to SQL but I keep getting a lamda error endencies
d to public static void mainString args
launchargs;
@Override
public void startStage stage
TableColumn vbox.getChildrenaddAlltable;
Scene scene new Scenevbox;
stage.setScenescene;
stage.setTitleBook Library";
stage.show;
private void loadBooksFromDatabase no usages
BookLibraryCon BookLibraryCon new BookLibraryCon;
BookLibraryCon.getBooksforEachbook data.addbook;
import java.sqlSQLException;
public class BookLibraryCon
public void getBooks no usages related problem
String query "SELECT FROM books";
try Connection conn DatabaseConnection.getConnection;
PreparedStatement stmt conn.prepareStatementquery;
ResultSet rs stmtexecuteQuery
while rsnext
System.out.printlnID: rsgetString columnLabel: id;
System.out.printlnTitle: rsgetString columnLabel: "title";
System.out.printlnAuthor: rsgetString columnLabel: "author";
System.out.printlnStatus: rsgetString columnLabel: "status";
catch SQLException e
eprintStackTrace;
com.example.sproject.BookStatus.java
public enum BookStatus
COMPLETED, no usages
WANTTOREAD, no usages
READ, no usages
DIDNOTFINISH, no usages
public BookStatus get nousages
public BookStatus
public void setBookStatus status nousages
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
