0% found this document useful (0 votes)
91 views

Sqliteopenhelper Book Appcompactactivity

The document describes an Android app with four activities - MainActivity, DisplayActivity, InsertActivity, and DeleteActivity. The app uses a Book model class to represent books with author, title, and code fields and get/set methods. It also uses a BookHelper class that extends SQLiteOpenHelper to manage a SQLite database with a books table based on the Book class to perform CRUD operations.

Uploaded by

api-460383295
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views

Sqliteopenhelper Book Appcompactactivity

The document describes an Android app with four activities - MainActivity, DisplayActivity, InsertActivity, and DeleteActivity. The app uses a Book model class to represent books with author, title, and code fields and get/set methods. It also uses a BookHelper class that extends SQLiteOpenHelper to manage a SQLite database with a books table based on the Book class to perform CRUD operations.

Uploaded by

api-460383295
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

AppCompactActivity SQLiteOpenHelper Book

- author: String
- title: String
+ OnCretae(): View + onCreate(SQLiteDatabase sqlLiteDatabase): void - code: int
+ onUpgrade(SQLiteDatabase sqlLiteDatabase): void
+ getAuthor(): String
+ setAuthor(String author): void
+ getTitle(): String
+ setTitle(String title): void
+ getCode(): int
+ setCode(int code): void
+ Book(String author, String title)
MainActivity DisplayActivity InsertActivity DeleteActivity

+ tvAuthor: TextView + etTilte: EditText + etAuthor: EditText


+ tvTitle: TextView + etAuthor: EditText + etTitle: EditText
+ goToDisplay(View view): void + bookHelperObject: BookHelper + bookObject: Book + bookHelperObject: BookHelper
+ goToInsert(View view): void + results: Cursor + bookHelperObject: BookHelper + results: Cursor BookHelper
+ goToDeleteActivity(View view): void
+ readRecord(View View): void + deleteDB(View deleteBtn): void + Key_ID: String
+ insertDB(View insertBtn): void + Key_Author: String
+ Key_Title: String
+ DBName: String
+ DBVersion: int
+ CREATE_BOOK_TABLE: String

+ addBook(Book bookDb): void


+ removeBook(String strAuthor, String strTitle): int
+ readAllBooks(): Cursor

You might also like