The DVD shop:
The shop has a small stock of DVDs that customers can purchase, by adding them to an internal shopping basket and them checking this basket out their purchases, a customer’s account must have sufficient finds, and will be debited after the sale. The DVD Shop class should define a method run Shop that repeatedly offers three options to the user:
-Login existing customers;
-Create a new customer;
- Close the shop down.
If the “create customer” option is chosen, the user is then asked to enter the new customer’s name; this is required to be that of an existing customer at the bank. Your program should check this, and refuse to create a shop account if there is no corresponding bank account.

When an existing customer logs on they presented with a menu of five options:
-Add a product to the customer’s ”basket”, choosing this option produces and on-screen lists of DVD titles that are currently in stock, and the customer can select a title, or can cancel. When at title is selected, one copy of that title is added to the customer’s “shopping basket”, and one reduces the number of copies in the stock.
-Remove an item from basket: the contents of the customer’s basket are listed, and the customer is allowed is chosen which item to remove. The number of copies on the stock for that item should also be updated.
-View basket: the contents of the shopping basket are printed; the price of each item should be shown along with the total value of items in the basket.
-Checkout: Provided the customer’s account contains enough money to buy all the items in the basket, their account is decremented by the total value, and their basket set to be empty. The shop should also update a record of its total sales. If the customer lacks sufficient funds to buy the items, this is reported, and the basket is left unchanged (the customer may then wish to remove some items).
-Logout: the customer decides to stop shopping, and leaves the shop. Anything in their basket remains in the basket – when the customer next logs on, they will see the same basket. Once a customer has logged out, the program resumes the main “run Shop” loop.
When the shop is closed down, the program should finish by displaying the shop’s total income, and should print the bank accounts of its customers.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

public class BankAccount {
    private int number;
    private double balance;

    * constructor
    public BankAccount() {
       number = -1;
       balance = 0;

    * constructor
    * @param number
    * @param balance
    public BankAccount(int number, double balance) {
       this.number = number;
       this.balance = balance;

    * getter
    * @return
    public int getNumber() {
       return number;
    * getter
    * @return
    public double getBalance() {
       return balance;
$40.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats