Specification

Simulate downloading songs from a website. A user has $100 in credit and can download songs at 10 cents per download (simulated). The system has a hard-coded set of songs and users; see the base code for all user and song values. A snapshot of the initial screen is shown below; your system should be as close to the GUI as possible. A full set of snapshots is given in UTSOnline/Assignments/2/snaps.

The user enters an (integer) id and (string) password and clicks on the Find button. If successful, the id and password are cleared and the user name and balance are shown in the status field below the button; if the id or password is wrong, the status field shows an error message. Any click on the Find button clears the list of user songs (initially empty). See image.

After logging in, the user clicks on a song (at right) and that song is added to the user's bought songs (after charging $0.10), shown at bottom left; only the song name is shown. The list of songs is scrollable. The new user balance is also shown in the status field.

The window appears at location (0, 500). I used a BorderLayout for the system panel. Vertical struts are of size 10 or 20, and horizontal struts are of size 5. A table column is 120 pixels wide.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.