Question: In Android Studio using java, create a system that serves to reserve vinyl records. The system should make use of a database and tables for
In Android Studio using java, create a system that serves to reserve vinyl records. The system should make use of a database and tables for information using the SQLite database. The database design goes as follows:
Customer Table:
CustomerID Primary Key
Username
Password
Admin Table:
AdminID Primary Key
Username
Password
Vinyl Table:
VinylID Primary Key
Title
Artist
Genre
ReleaseYear
Availability
RESERVATION Table:
ReservationID Primary Key
CustomerID Foreign Key referencing Customer.UserID
VinylID Foreign Key referencing Vinyl.VinylID
DateReserved
Database Entries: Here are Entries to be inserted for the respective tables:
Customer Table:
Entry : DaisyJonessix Username; FltwoodMac Password
Entry : PinkSlip Username; FrakyFriday Password
Entry : TheDreams Username; DramGrls Password
Admin Table:
Entry : MartyWolf Username; BgFatLar Password
Entry : LuciousLion Username; mpire Password
Entry : PaperBoi Username; Atanta Password
Vinyl Table:
Entry : Love Deluxe Title; Sade Artist; R&BSoul Genre; ReleaseYear; Available Availability;
Entry : To Pimp a Butterfly Title; Kendrick Lamar Artist; HipHopRap Genre; ReleaseYear; Available Availability;
Entry : Condition Title; Salute Artist; Alternative Genre; ReleaseYear; Availability;
Entry : NeverMind Title; Nirvana Artist; Alternative Genre; ReleaseYear; Availability;
Entry : I Want You Title; Marvin Gaye Artist; R&BSoul Genre; ReleaseYear; Availability;
Main activity: Design a login page by using ConstraintLayout. Define TextViews one with "User Name", and the other with "Password" as their texts corresponding EditTexts for User Name and Password and Button with "LOGIN" as its text Also define and put one TextView for error message which could be used in Step Make sure the password wont show in clear text. When you rotate the device, make sure you persist the inputs. Define an ImageView in order to insert an image for a logo When the LOGIN button is clicked, if User's Name and the Password match an entry from the Customer database table or the Admin database table both the username and password columns from the row have to match then please launch the second activity and pass the user name to the second activity. Hint: Passing Bundle on StartActivity Otherwise, put some error message to prompt the user. The error message could be something like Incorrect login credentials. Try again. Make sure you follow the rules defined here.
Second Activity: On the second activity please put a sentence like Welcome XXX XXX represents the user name that is passed from the login activity. That is you can not hard code the user name. Define Buttons one with VIEW CATALOG one with MY RESERVATION one with LOGOUT and one with EDIT CATALOG If the user currently logged in is from the CUSTOMER database table, then do not show the Edit Catalog button and make it inactive. Otherwise, show the button and make it active. After the VIEW CATALOG button is clicked, launch the third activity. After the MY RESERVATION button is clicked, launch the fourth activity. After the EDIT CATALOG button is clicked, launch the fifth activity. After the LOGOUT button is clicked, return back to the main activity and start over. Make sure you follow the rules defined here.
Third Activity: Design a catalog page by using TableLayout. This page should display the VINYL table and the entries from it Each entry should have its own RESERVE button defined to the VinylID. When the RESERVE button is clicked, a entry should be made into the RESERVATION table, matching the VinylID from the Vinyl table and the CustomerID from the CUSTOMER table, then launching the fourth Activity only if the Availability cell is equal to Available Otherwise, put some error message to prompt the user. The error message could be something like The product is not available. Define a TextView with VINYL CATALOG as its text. Additionally, Define a button named RETURN, which upon clicking will return back to the second activity. Make sure you follow the rules defined here.
Fourth Activity: Design a reservation page by using TableLayout.The page should display any created Reservation table entries passed by the third activity. Define a TextView with MY RESERVATION as its text. The DateReserved cell should reflect the date that the entry was made. Additionally, Define a button named RETURN, which upon clicking will return back to the second activity. Make sure you follow the rules defined here.
Fifth Activity: Design a catalog page by using TableLayout. This page should display the Vinyl table and the entries from it Each entry should have its own REMOVE button defined to the VinylID. When the REMOVE button is clicked, the corr
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
