IntroOOP Docs
Fall 2025
API

# Customer

o1.classes.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.

## 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

## Attributes

Graph
Supertypes
  class Object
  trait Matchable
  class Any

## Members list

### 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.

## Attributes

Definition Classes
  Any

#### Concrete fields

val address: String
val customerNumber: Int
val email: String
val name: String