Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ServicePkg;
- public class Customer {
- // number of all Customers
- private static int totalCounter = 0;
- private int number;
- public Customer() {
- totalCounter += 1;
- this.number = totalCounter;
- }
- public static int getTotalCounter() {
- return Customer.totalCounter;
- }
- public int getNumber() {
- return this.number;
- }
- @Override
- public String toString() {
- return "Customer #" + this.number;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement