x

Choose Country Code

x

Direction

x

Ask a Question

  • Ask a Question
  • Scan a Question
  • Post MCQ
  • Note: File extension must be of jpg, jpeg, png, bmp format and file size must not exceed 5 MB
x

Ask a Question

x

x
x
x
Hire a Tutor

Answers and Solutions

What's Your Question?
Answer

 

public class Customer {

    private int idNumber; // Customer ID number
    private String name; // Customer name
    private ShoppingCart items; // Customer's shopping cart
    private Address mailingAddress; // Customer's mailing address

    // Static variable to track the next available ID number
    private static int nextIDNumber = 1; 

    /** Construct a new customer object with name and mailing address */
    public Customer(String name, Address mailingAddress) {
        this.idNumber = nextIDNumber++; 
        this.name = name;
        this.mailingAddress = mailingAddress;
        this.items = new ShoppingCart();
    }

    

Post Answer and Earn Credit Points

Get 5 credit points for each correct answer. The best one gets 25 in all.

Post Answer