Question: import java.util.ArrayList; public class User implements PurpleBoxUserInterface { private String name, email, title, genre; private MyDate date; ArrayList checkOut = new ArrayList (); public User()

import java.util.ArrayList;

public class User implements PurpleBoxUserInterface {

private String name, email, title, genre; private MyDate date; ArrayList checkOut = new ArrayList<>();

public User() {

}

public User(String name, String email, String title, String genre, MyDate date) { this.name = name; this.email = email; this.title = title; this.genre = genre; this.date = date; }

@Override public String searchTitle() { // TODO Auto-generated method stub return null; }

@Override public String searchGenre() { // TODO Auto-generated method stub return null; }

@Override public String searchReleaseDate() { // TODO Auto-generated method stub return null; }

@Override public String addMovie() { // TODO Auto-generated method stub return null; }

@Override public String removeMovie() { // TODO Auto-generated method stub return null; }

@Override public String removeAll() { // TODO Auto-generated method stub return null; }

@Override public String returnMovie() { // TODO Auto-generated method stub return null; }

@Override public String applyCode() { // TODO Auto-generated method stub return null; }

@Override public boolean hasAccess() { // TODO Auto-generated method stub return false; }

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public String getEmail() { return email; }

public void setEmail(String email) { this.email = email; }

public String getTitle() { return title; }

public String getGenre() { return genre; }

public MyDate getDate() { return date; }

public void setDate(MyDate date) { this.date = date; }

public ArrayList getCheckOut() { return checkOut; }

public void setCheckOut(ArrayList checkOut) { this.checkOut = checkOut; } @Override public String toStirng() { // TODO Auto-generated method stub return null; }

}

Hi, need help for this:

develop a PurpleBoxUserInterface and PurpleBoxAdminInterface interface. Your job is be to create a PurpleBox class that implements the functionality of both interfaces.

Part1

Develop the PurpleBoxUserInterface and PurpleBoxAdminInterface. The interface should provide methods for the requirements below and should include consideration of exception handling. It should also include pre- and post-conditions, parameters and return types on your methods using javadoc documentation.

General capabilities available to users (and defined in PurpleBoxUserInterface) shall include: Search for movies (see all, Blu-ray vs. DVD, according to genre, new release/date)

Add movie to shopping cart

Remove movie from shopping cart

Remove all movies from shopping cart

See if movie is available

Check out/rent movies in cart

Return movies

Apply promo code

Challenge (optional):Maintain user account information Check my account (users inventory)

General capabilities available to admins (and defined in PurpleBoxAdminInterface) shall include:

Add movie to inventory

Remove movie from inventory

Change prices (same price for all DVD and Blu-ray disks)

Volume discountAdd

promo codes

Disable unit

Enable unit

Only one set of interfaces should be submitted per pair of pairs.

Part2

Develop a test program for your implementation based on the interface you created. This should include a test driver class that contains a main method that allows users to perform typical PurpleBox functions. It must allow testing of all required functionality from part1. These tests must utilize an object of type PurpleBox and should include calls to all methods that are part of your interface. It should allow the user to test your program interactively.In order to achieve this, you must create a skeleton class of type PurpleBox with all the required methods.

This is all I got, note that the methods may be stubbed out (not perform their required functions, but have a valid prototype and return something of the required return type), I think we just have to build the fonctionalities of a purpleBox.

1. rent a movie, return it, search a movie by tittle, by year.

2. Add a shopping cart where you can make the adding and removing operations

3. each interface would have a class associated to him.

These are my interfaces:

public interface PurpleBoxUserInterface {

public String searchTitle();

public String searchGenre();

public String searchReleaseDate();

public String addMovie();

public String removeFromCart();

public String removeAllFromCart(); public boolean checkAvailability(); public Movie checkOutMovie();

public String returnMovie();

public String applyCode();

}

//Movie interface

public interface MovieADT {

public String getTitle();

public void setTitle(String title);

public String getGenre();

public void setGenre(String genre);

public MyDate getDate();

public void setDate(MyDate date); public boolean getIsBluRay(); public void setIsBluRay(boolean bluRay); public double getPrice(); public void setPrice(double price); public int getQuantity(); public void setQuantity(int quantity); public String toSring(); }

// purpleBoxAdminIterface

public interface AdminADT {

public Movie addMovieToInventory(Movie addMovieToInv);

public Movie removeFromInventory(Movie removeFromInv);

public Movie changePrices(Movie changePrice);

public Movie volumeDiscount(Movie volDiscount);

public Movie addPromoCode(Movie addPromo);

public boolean isEnable(boolean isEnable)

}

I would need help for classes associated with those interfaces and a test class to run the entire app.

//Sample user class

import java.util.ArrayList;

public class User implements PurpleBoxUserInterface {

private String name, email, title, genre; private MyDate date; ArrayList checkOut = new ArrayList<>();

public User() {

}

public User(String name, String email, String title, String genre, MyDate date) { this.name = name; this.email = email; this.title = title; this.genre = genre; this.date = date; }

@Override public String searchTitle() { // TODO Auto-generated method stub return null; }

@Override public String searchGenre() { // TODO Auto-generated method stub return null; }

@Override public String searchReleaseDate() { // TODO Auto-generated method stub return null; }

@Override public String addMovie() { // TODO Auto-generated method stub return null; }

@Override public String removeMovie() { // TODO Auto-generated method stub return null; }

@Override public String removeAll() { // TODO Auto-generated method stub return null; }

@Override public String returnMovie() { // TODO Auto-generated method stub return null; }

@Override public String applyCode() { // TODO Auto-generated method stub return null; }

@Override public boolean hasAccess() { // TODO Auto-generated method stub return false; }

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public String getEmail() { return email; }

public void setEmail(String email) { this.email = email; }

public String getTitle() { return title; }

public String getGenre() { return genre; }

public MyDate getDate() { return date; }

public void setDate(MyDate date) { this.date = date; }

public ArrayList getCheckOut() { return checkOut; }

public void setCheckOut(ArrayList checkOut) { this.checkOut = checkOut; } @Override public String toStirng() { // TODO Auto-generated method stub return null; }

}

Thank you for all your help and support

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!