Home > Back-end >  Java object-oriented
Java object-oriented

Time:10-14

Design a cash register class:
Attributes are: (1) a one-dimensional commodity type array [commodity class two attributes: name, price] (2) (3) in total paid-in (4) the change
Methods: (1) add goods (2) (3) the total computing change
Commodity categories: public class Goods {
}
Commodity type array: Goods [] [] Goods=new Goods [] []
  • Related