Question: hey so I kinda need help with my code. I started the first part of it but then got stuck and I'm not so sure
hey so I kinda need help with my code. I started the first part of it but then got stuck and I'm not so sure what to do next this is my code
public class BookStore {
private int products; private int memberships; private boolean payment; public BookStore(int products, int memberships, boolean payment ){ this.products=products; this.memberships=memberships; this.payment=payment; } public int getProducts(){ return products; } public int getMemberships(){ return memberships; } public boolean isPayment(){ return payment; } public void setProducts(int products){ this.products = products; } public void setMemberships(int memberships){ this.memberships = memberships; } public void setPayment(boolean payment){ this.payment = payment; } public class memberships{ private int regularmember; private int premiummember; } }
and this is what I was supposed to do The owner of a bookstore has asked for your help designing a system that allows them to keep track of the stores inventory and members. The owner provides you with the following details about what the store offers:
The store sells three types of products: books, CDs, and DVDs. The store offers two types of memberships to customers: regular memberships and premium memberships. The regular membership is free, while the premium members pay a fee every month. The store keeps track of payment method for their premium members and whether the monthly fee is due or has been paid. The system should keep track of the members and how much money each has spent at the store regardless if they are regular or premium members. The system also keeps track of the inventory of each product. Your design of this system must include 3 distinct functionality. A function, in this context, are abstract ideas like "register a new premium member", or "complete a purchase". While in many programming contexts a specific function refers to what we refer to as methods in Java, here function and method are NOT synonymous. Functions here refer to the holistic application/program/system that we are creating for managing a bookstore. To implement your functions it may take one or more methods and will likely involve 1 or more of your classes.
One of these functions MUST be to complete a purchase. In order for that to happen the user should be able to select one or more items, and those items should be deducted from the inventory after the purchase is completed. The other two functions are entirely your choice.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
