Customer

class Customer(val name: String, val customerNumber: Int, val email: String, val address: String)

Class Customer represents customers (of an imaginary, way simplified online store). Each customer has attributes such as name and contact information. A customer object is immutable; to represent changed customer info, a new object is created.

Value parameters:
address

the street address of the customer

customerNumber

a number that uniquely identifies the customer (a positive integer)

email

the email address of the customer

name

the full name of the customer

class Object
trait Matchable
class Any

Value members

Concrete methods

override def toString: String

Returns a textual description of the customer’s key info.

Returns a textual description of the customer’s key info.

Definition Classes

Concrete fields