50.4k views
9 votes
Create a project called CashRegisterClassReview

Create a class called CashRegister
include the following instance variables
itemCount
cashRegisterTotal
allCashRegisterTotals (static)
Please add more variables, this is the minimum you need
include the following methods with their appropriate action
addItem( double)
removeItem( double)
getCashRegisterTotal()
getCount()
getAllCashRegisterTotals()
clear()
Please add more methods, this is the minimum you need
make sure to create a constructor(s)
make sure to comment your code/methods
Create another class called UsingCashRegister
instantiate CashRegister and use the assessors/mutators to manipulate and retrieve data
Turn in screen shots of the result
Also turn in the two java files CashRegister and UsingCashRegister
Java Please! Please do usingCashRegister class.

public class CashRegister {
private int itemCount = 0;

private cash CashRegisterTotal = new cash();

private static cash allCashRegisterTotal = new cash();

public CashRegister() {

this(new cash(new int[]{100, 100, 100, 100, 100}));
}

public CashRegister(Cash allCashRegisterTotal) {

this.allCashRegisterTotal.add(allCashRegisterTotal);
}

public double addItem(int item) {

itemCount += item;

return itemCount;
}

public double removalItem(double itemdelete) {
itemCount -= itemdelete;

return itemCount;
}

public double getCashRegister(double amount) {
CashRegisterTotal += amount;

return CashRegisterTotal;
}

public void getCount(cash amount) {

itemCount.add(amount);

}

public cash getAllCashRegisterTotal() {

CashRegisterTotal.add(itemcount);

cash Change = new cash();

Change.add(CashRegisterTotal);

Change.remove(itemCount);

allCashRegisterTotal.remove(change.getValue());

itemCount = 0;

CashRegisterTotal = new cash();

return Change;
}

User Marczych
by
8.6k points

1 Answer

7 votes

Answer:

the blessings of the blessings of the Philippines and then you can review music of the Philippines

User Alpesh Gediya
by
8.6k points