o1.classes

package o1.classes

Members list

Type members

Classlikes

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.

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

Supertypes
class Object
trait Matchable
class Any
class Employee(var name: String, val yearOfBirth: Int, var monthlySalary: Double)

The class Employee represents employees (in an imaginary accounting app). Each employee has a number of attributes such as name and monthly salary. Most of these attributes are mutable.

The class Employee represents employees (in an imaginary accounting app). Each employee has a number of attributes such as name and monthly salary. Most of these attributes are mutable.

Parameters

monthlySalary

the monthly salary of the employee, in euros and excluding any incidental costs

name

the name of the employee

yearOfBirth

the year the employee was born

Attributes

Supertypes
class Object
trait Matchable
class Any
class Order(val number: Int, val orderer: Customer)

Class Order represents orders of zero or more products (in an imaginary and way simplified online store). This simple implementation does not record every individual instance of a product added to the order, only the total price of the added products.

Class Order represents orders of zero or more products (in an imaginary and way simplified online store). This simple implementation does not record every individual instance of a product added to the order, only the total price of the added products.

Parameters

number

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

orderer

the customer that placed the order

Attributes

Supertypes
class Object
trait Matchable
class Any