// Exercise 1, 2 and 3
// indicatorNumber, accountHolder, balance and password
BankAccount account = new BankAccount(12345, "Cindy Lauper", 200.50, "3210");
account.showAccountHolderNameAndBalance();
public class BankAccount
{
public int indicatorNumber;
public string accountHolder;
public double balance;
public string password;
public BankAccount(int indicatorNumber, string accountHolder, double balance, string password)
{
this.indicatorNumber = indicatorNumber;
this.accountHolder = accountHolder;
this.balance = balance;
this.password = password;
}
public void showAccountHolderNameAndBalance()
{
Console.WriteLine($"Account Holder: {accountHolder}");
Console.WriteLine($"Balance: {balance}");
}
}
// Exercise 4
public class Car
{
public string make;
public string model;
public int year;
public string color;
public Car(string make, string model, int year, string color)
{
this.make = make;
this.model = model;
this.year = year;
this.color = color;
}
public void speedUp()
{
Console.WriteLine("Speed up!");
}
public void brake()
{
Console.WriteLine("Break!!");
}
public void Honk()
{
Console.WriteLine("Honk!!");
}
}