SlideShare a Scribd company logo
Programming II hiding, and replacing members, Serialization, Generics, Linq ExceptionType
enum You will implement this enum in Visual Studio. There are seven members: Assignment 4 -
Implementing a Banking Application Due: See course shell for due date and time Check with
you professor to see if you are permitted to work as a group. The members are self-explanatory.
AccountType enum You will implement this enum in Visual Studio. There are three members:
The application is by far the most complex system that you have attempted so far. It consists of
eleven classes, two structs, one interface and two enums coupled in varying degrees of tightness.
The Bank class is the main driver of the application. It has collection of Accounts and Person
that is initialize appropriately in the static constructor. You will implement the entire system in
Visual Studio. A short description of each type with their members is given below. You are
advised to implement each type in the order that they are described. No method should have a
Console. WriteLine() unless you are explicitly told to output something on the console. Each
type must be in separate files.
Assignment 4, Winter 2022 Assignment 4, Winter 2022 hiding, and replacing members,
Serialization, Generics, ling Uses - Inheritance, Interfaces, Exceptions, EventHandlers,
Collections Operator overloading, Utils class hiding, and replacing members, Serialization,
Generics, Ling [The implementation for this class is given in the appendix. Create a class called
UtIs and copy and 1. Time - this public class variable is of type Day Time. It adds a random
value to the internal field_time and then returns it. past the statements into the appropriate part of
the file] 2. Now - this public class variable is of type Day Time. It adds zero to the internal
field_time You will implement the Utils class in Visual Studio. This class is comprised of three
fields and and then returns it. provides two static properties. It simulates the passage of time.
Each time the Time property is Methods: accessed, it increases the internal field by a random
amount. It is used to time stamped all banking There are no explicitly defined methods. You do
not have to code this class. Just copy the code statements from the appendix of this A short
description of each dass member is given below: document. Properties: There are three
properties. 1. _time - this private class variable is of type DayTime that store the time of this
object. It is initialized (with argument 1_648_600_800 ) at declaration. It is mutated (changed)
whenever either of the properties is accessed. 2. random - this private class variable is of type
Random storing the time of this object. It is initialized (with argument 1_848_800_800) at
declaration. It is mutated (changed) whenever elther of the properties is accessed. 3.
ACCOUNT_TYPE - this private class variable is of type Dictionary. It serves as a lookup table
to match an account type with a particular prefix, It is initialized (code is given in the appendix)
at declaration. Properties: There are two properties, both of which are computed.
Assignment 4, Winter 2022 Assignment 4, Uses - Inheritance, Interfaces, Exceptions,
EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions,
Event Handlers, Collections Operator averloading, hiding, and replacing members, Serialization,
Generics, Ling hiding, and replacing members, Serialization, Generics, Linq ITransaction
interface AccountException class You will implement the ITransaction Interface in Visual
Studio. The three Account sub classes You will implement the AccountException Class in Visual
Studio. This inherits from the Exception implement this interface. Class to provide a custom
exception object for this application. It consists of a single a constructor: A short description of
each class member is given below: Fields: Properties: There are no fields There are no
properties. Properties: Methods: There are no properties 1. void Withdraw(double amount,
Person person). 2 void Deposit(double amount, Person person). Constructor: 1. public
AccountException(ExceptionType reason )-this public constructor invokes the base constructor
with an appropriate argument. The base constructer argument is obtain by calling the Tostring()
of the argument. [You are sending the argument of the child constructor to the parent
constructor.] Methods: There are no methods.
Winter 2022 Assigniment 4, Inheritance, Interfaces, Exceptions, EventHandlers, Collections
Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections
Operator overloading, and replacing members, Serialization, Generics, Ling hiding, and
replacing members, Serialization, Generics, Linq TransactionEventArgs class Il implement the
LoginEventArgs Class in Visual Studio. This inherits from the You will implement the
TransactionEventArgs Class in Visual Studio. This inherits from the Args Class to provide a
custom object for this application. It consists of two properties and LoginEventArgs Class to
provide a custom object for this application. It consists of a single e a constructor: property and a
single a constructor: Fields: There are no fields Properties: here are two public properties, with
no accompanying setters. There is one explicitly defined public property, with no accompanying
setters. Constructors: onstructors: 1. public LoginEventArgs (string name, bool success) - this
public constructor 1. public TransactionEventArgs(string name, amount, takes a string and a bool
argument and does the following: success ) - this public constructor takes a string, a double and a
bool argument and does the following: a. Invokes the base constructor b. Assigns the arguments
to the appropriate properties. a. Invokes the base constructor with the appropriate arguments. b.
Assigns the middle argument to the appropriate property. Methods: Methods: There are no
explicitly defined methods. There are no explicitly defined methods.
Assignment 4 Winter 2022 Assigniment 4, Winter 2022 Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members,
Serialization, Generics, Ling hiding, and repla Transaction struct You will implement the
Transaction struct in Visual Studio. The only purpose of this stuct is to 1. pubiic Transaction(
string accountNumber, double amount, Person capture the data values for each transaction. A
short description of the struct members is given person) - This public constructor takes three
arguments. It assigns the arguments to the below: appropriate properties. It also sets the Time
property to the Time property of the Utils class. Methods: 1. public override string Tostring( ) -
This method overrides the same method of the Object class. It does not take any parameter and it
returns a string representing the account number, name of the person, the amount, and the time
that this transition was completed. [See the output for clues for this method.] You must include
the word Deposit or Withdraw in the output. Properties: There are no fields. Properties? All the
properties are public with the setter absent 1. AccountNumber - this property is a string
representing the account number associated with this transaction. The getter is public, and the
setter is absent. 2. Amount - this property is a double representing the account of this transaction.
The getter is public, and the setter is absent. 3. Originator - this property is a Person representing
the person initiating this transaction. The getter is public, and the setter is absent. 4. Time - this
property is a DayTime type representing the time associated with this transaction. The getter is
public, and the setter is absent.
Assignment 4, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator
overloading, Assignment 4, Assignment 4, hiding, and replacing members, Serialization,
Generics, Linq DayTime struct hiding, and replacing members, Serialization, Generics, Linq
Constructors: You will implement the DayTime struct in Visual Studio. The only purpose of this
stuct is to capture the time of an event. 1. public Day( long minutes) - This public constructor
takes a single long argument and assigns it to the appropriate field. The logic of this class
depends on the following: Methods: - 1 hour =60 minutes 1. Public static DayTime operator + (
DayTime lhs, int minutes ) - This - 1 day =24 hours =2460=1_440 minutes method overload the
addition operator. Returns a new struct with the original minutes - 1 month =30 days
=30=1_440=43_200 minutes that is increased by the second argument. This is used in the Util
class to get the current - 1 year =12 months =1243_200=518_400 minutes time (Utils . Now) and
incremented time (Utils . Time). - Time starts on the zero minute of the zero hour of the first day
of the first month of the 2. public override string Tostring( ) -This method overrides the same
method zero year. i.e. 0 minute will be 11: of the Object class. It calculates the year, month, day,
hour, and remaining minutes from the private minutes field. [See the output for clues for this
methad.] A short description of the struct members is given below: Properties: There is a single
private field. 1. minutes - this private field is a long representing the minute value of this struct.
[The time on a computer system is a simple counter. The long counter represents the number of
ticks (milliseconds) since 1970 January 1] Properties: There are no properties.
Assignment 4, Assignment 4 Uses - Inheritance, Interfaces, Exceptions, EventHandlers,
Collections Operator overloading, Winter 2022 hiding, and replacing members, Serialization,
Generics, Linq Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator
overloading, Logger class hiding, and replacing members, Serialization, Generics, Ling
Methods: You will implement the Logger Class in Visual Studio. This is a static class with some
housekeeping 1. public static void LoginHandler(object sender, EventArgs args)-This duties. It
handles all login attempts and transaction occurrences. method does the following: A short
description of each class member is given below: a. Uses the as operator to cast the second
argument to a LoginEventArgs object. b. Create a string with the following: - PersonName (from
args). - Success (from args). - Current time (from Utils . Now). c. Adds the above string to the
loginEvents collection. This method does not display anything 2. public static void
TransactionHandler(object sender, EventArgs args) - This method does the following: a. Uses
the as operator to cast the second argument to a TransactionEventArgs object. b. Create a string
with the following: - PersonName (from args). - Amount (from args) - Operation (from Amount
in args) - Success (from args). - Current time (from Utils . Now). c. Adds the above string to the
transactionEvents collection. This method does not display anything 3. public static void
ShowloginEvents( ) - This is method does not take any parameters nor does it return a value. The
method does the following: a. Prints the current time (Utils. Now) b. Prints a number list of all
the items in the loginEvents collection. 4. public static void ShowTransactionEvents ( ) - This is
method does not take Fields: any parameters nor does it return a value. The method does the
following: There are two fields: a. Prints the current time (Utils. Now) 1. LoginEvents - this
private static Listfield represents login attempts to the bank. This is initialized to an empty
collection at declaration. 2. transactionEvents - this private static Listfield represents login
attempts to the bank. This is initialized to an empty collection at declaration. Properties: There
are no properties.
Assignment 4, Winter 2022 Assignment 4, Winter 2022 Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members,
Serialization, Generics, Ling hiding, and replacing members, Serialization, Generics, Ling
Person class 1. SIN - this string property represents the sin number of this person. The getter is
public, You will implement the Person Class in Visual Studio. A person object may be
associated with and setter is absent. multiple accounts. A person initiates activities (deposits or
withdrawal) against an account that is 2. Name - this property is a string representing the name of
this person. This getter is captured in a transaction object. public, and setter is absent. 3.
IsAuthenticated - this property is a bool representing if this person is logged in with A short
description of each class member is given below: the correct password. This is modified in the
Login () and the Logout() methods. This getter is public, and setter is absent. Constructors: 1.
public Person(string name, string sin)-This public constructor takes two parameters: a string
representing the name of the person and another string representing the SIN of this person. It
does the following: a. The method assigns the arguments to the appropriate fields. b. It also sets
the password field to the first three letters of the SIN. [use the Substring (start position, length)
method of the string class] Methods: 6. public void Login(string password) - This method takes a
string parameter representing a password and does the following: a. If the argument DOES NOT
match the password field, it does the following: - Sets the IsAuthenticated property to false -
Invokes the EventHandler OnLogin with the following arguments: o The current object reference
(use this) - The second argument is of type LoginEventArgs. This will have arguments - the
name of the current object - and the success on the operation (use false in this case). - Creates an
AccountException object using argument AccountEnum.PASSWORD_INCORRECT - Throws
the above exception Fields: b. If the argument matches the password, it does the following:
There are two fields: - Sets the IsAuthenticated property is set to true 3. Password-this private
string field represents the password of this person. - Invokes the EventHandler OnLogin with the
following arguments: (N.B. Password are not normally stored as text but as a hash value. A
hashing function - The current object reference (use this) operates on the password and the
resulting hash value is stored. When a user supplies a - The second argument is of type
LoginEventArgs. This will have password, it is passed through the same hashing function and
the result is compared to arguments the stored value.) - the name of the current object 4.
OnLogin - this public event field represents the EventHandler that will store the method to be
invoked. This method does not display anything 7. public void Logout ( ) - This is public method
does not take any parameters nor does it return a value.
Assignment 4 Winter 2022 Assignment 4, Winter 2022 Uses-Inheritance, Interfaces, Exceptions,
Eventhandlers, Collections Operator overloading. Uses - Inheritance, Interfaces, Exceptions,
EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization,
Generics, Linq hiding, and replacing members, Serialization, Generics, Linq 2. transactions - this
readonly puble field is a list of transaction representing the a. Increase (or decrease) the property
Balance by the amount specified by its deposits, withdrawal, payments and purchases of this
account. This initialized at in the argument. constructor to an empty collection. b. Update the
property LowestBalance based on the current value of Balance. 3. LAST_NUMBER - this
private field is a class variable of type int. It represents the last c. Create a Transaction object
based on the account Number, the amount (specified account number that was used to generate
the unique account number. It is initialized at by the argument), a person object (specified by the
argument. declaration to 100,000 and is modify in the constructor. d. Adds the above object to
the list of transactions This is method is called by the Deposit and Withdraw methods of the
derived classes Properties: CheckingAccount and SavingsAccount as well as the DoPurchase and
DoPayment 1. Balance-this property is a double representing the amount in this account. This is
of the VisaAccount class. modified in the Deposit () method and in the PrepareMonthlyReport ()
method of This method does not display anything, nor does it return a value. the derived classes.
This is an auto-implemented property the getter is public and the 3. public void AddUser( Person
person ) - This public method takes a person setter is protected object as a parameter. It adds the
argument to holders (the list of persons). This method 2. LowestBalance - this property is a
double representing the lowest balance that this does not return a value, nor does it display
anything on the screen. amount ever drops to. This is modified in the Deposit() method. This is
an autoimplemented property the getter is public and the setter is protected 3. Number-this
property is a string representing the account number of this account. The getter is public and the
setter is absent. 4. Public bool IsUser( string name )-This public method that takes a string
parameter representing the name of the user and returns true if the argument matches the name of
a person in holders is not a sound design users will have the same name (the list of persons) and
false otherwise. Events: 1. OnTransaction - this event is a double representing the amount in this
account. This is You cannot use the Contains method of the list class because the list is a list of
persons modified in the Deposit () method and in the PrepareMonthlyReport () method of and
not a list of strings. You will have to use a loop to check each persen in the collection. the
derived classes. This is an auto-implemented property the getter is public and the Use linq to
implement this method. setter is protected This method does not display anything on screen. 5.
public abstract void PrepareMonthlyReport( )-This abstract public method does not take any
parameter nor does it return a value. Research how to declare an abstract method. Methods: This
method is implemented in the classes derived from Accounts. 1. public Account( string type,
double balance) - This is the public 6. public virtual void OnTransactionOccur(object sender,
EventArgs constructor. It takes two parameters: a three-letter string representing the type of the
args) - This public method invoke the EventHandler OnTransaction with its two account ("VS_-
", "SV-" and "CK-" for visa, saving and checking account respectively) arguments. This method
does not return a value, nor does it display anything on the and a double representing the starting
balance. The method does the following: screen. a. Sets the Number property to the
concatenation (joining) of the first argument and 7. public override string ToString( )-This
method overrides the same method the class variable LastNumber of the Object class. It does not
take any parameter but returns a string representation of b. Increments the class variable Last
Number this account. It does the following: c. Assigns the second argument to the property
Balance a. Declare and initialise a string variable to store the return value and add the d. Assigns
the second argument to the property LowestBalance following to it: e. Initializes the field
transactions to an empty list of Transactions. - The Number of this account f. Initializes the field
users to an empty list of Persons. - The names of each of the users of the account This
constructor is called in the constructors on the three derived classes 2. public void Deposit
(double amount, Person person) -This public method - The Balance take a double parameter
representing the amount to change balance by and a person - All the transactions object
representing the person who is performing this transaction. This method does the following:
Assignment 4, Winter 2022 Assighment 4 , Uses - Inheritance, Interfaces, Exceptions,
EventHandlers, Collections Operator overloading, Uses-Inheritance, Interfaces, Exceptions,
EventHandlers, Collections Operator overloading. hiding, and replacing members Serialization,
Generics, Ling hidirg, and replacing members, Serialization, Generics, Linq CheckingAccount
class starting balance of the account and a bool indicating if this account has over draft You will
implement the CheckingAccount Class in Visual Studio. This is a sub class is derived from
permission. The constructor does the following: the Account class and implements the
ITransaction interface. There are two class variables lie. a. It invokes the base constructor with
the string "CK-" and the appropriate variables that are shared but all the objects of this class. A
short description of the class members argument. is given below: [It uses the dictionary
ACCOUNI_TYPE and the enum AccountType to obtain the two letter prefix for this account
type] b. Assigns the hasoverdraft argument to the appropriate field. 2. Public new void
Deposit(double amount, Person person)-this public method takes two arguments: a double
representing the amount to be deposited and a person object representing the person do the This
definition hides the corresponding transaction. The method does the following: member in the
parent class because the base a. Calls the Deposit() method of the base class with the appropriate
arguments. b. Calls the OnTransactionOccur() method of the base class with the appropriate
arguments. i. The second argument TransactionEventArgs needs the name of the person, the
amount and true (success of the operation) 3. public void Withdraw( double amount, Person
person )-this public method takes two arguments: a double representing the amount to be
withdrawn and a person object representing the person do the transaction. The method does the
following: a. If this person in not associated with this account, it does the following: i. Calls the
OnTransactionOccur() method of the base class with the appropriate arguments. Read the above
Deposit() method for more explanation ii. Throws the appropriate AccountException object b. If
this person in not logged in, it does the following: i. Calls the OnTransactionOccur() method of
the base class with the appropriate arguments. ii. Throws the appropriate AccountException
object. 1. COST_PER_TRANSACTION - this is a class variable of type double representing the
unit c. If the withdrawal amount is greater than the balance and there is no overdraft facility, it
does the following: cost per transaction. All of the objects on this class will have the same value.
This class i. Calls the OnTransactionOccur() method of the base class with the variable is
initialized to ,65. 2. INTEREST_RATE - this is a class variable of type double representing the
annual interest appropriate arguments. rate. All of the objects on this class will have the same
value. This class variable is ii. Throws the appropriate AccountException object. d. Otherwise, it
does the following: initialized to 8.685 . 1. Calls the OnTransactionOccur() method of the base
class with the 3. hasoverdraft - this is a bool indicating if the balance on this account can be less
than appropriate arguments. zero. This private instance variable is set in the constructor. ii. calls
the Deposit() method of the base class with the appropriate arguments Methods: (you will send
negative of the amount) 1. public CheckingAccount ( double balance =, bool hasoverdraft = 4.
public override void PrepareMonthlyReport ( ) -this public method override false ) - This public
constructor takes a parameter of type double representing the the method of the base class with
the same name. The method does the following:
Assignment 4, Winter 2022 Assignment 4, Winter 2022 Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members,
Serialization, Generics, Linq hiding, and replacing members, Serialization, Generics, Linq 5.
public new void Deposit( double amount, Person person) -this public VisaAccount class method
takes two arguments: a double representing the amount to be deposited and a You will
implement the VisaAccount Class in Visual Studio. This is a sub class derived from the person
object representing the person do the transaction. This method does the following: Account class
and implements ITransaction interface. This class has a single class variable. A a. Calls the
Deposit () method of the base class with the appropriate arguments. short description of the class
members is given below: b. Calls the OnTransactionoccur () method of the base class with the
appropriate arguments. i. The second argument TransactionEventArgs needs the name of the
person, the amount and true (success of the operation) 2. public void Withdraw( double amount,
Person person) -thispublic method takes two arguments: a double representing the amount to be
withdrawn and a person object representing the person do the transaction. The method does the
following: a. If this person in not associated with this account, it does the following: i. Calls the
OnTransactionOccur () method of the base class with the appropriate arguments. Read the above
Deposit() method for more explanation ii. Throws the appropriate Account Exception object b. If
this person in not logged in, it does the following: i. Calls the OnTransactionoccur () method of
the base class with the appropriate arguments. ii. Throws the appropriate AccountException
object. c. If the withdrawal amount is greater than the balance and there is no overdraft facility, it
does the following: i. Calls the OnTransaction0ccur () method of the base class with the
appropriate arguments. ii. Throws the appropriate AccountException object. d. Otherwise it does
the following: i. Calls the OnTransactionoccur () method of the base class with the Fields:
appropriate arguments. 1. creditLimit-this is a double representing the maximum balance
allowable on this ii. calls the Deposit() method of the base class with the appropriate account.
This private instance variable is set in the constructor. arguments (you will send negative of the
amount) 2. INTEREST_RATE - this is a class variable of type double representing the annual
interest 3. public override void PrepareMonthlyReport () -this public method override rate. All of
the objects on this class will have the same value. This class variable is the method of the base
class with the same name. The method does the following: initialized to 0.1995 . a. Calculate the
service charge by multiplying the number of transactions by the COST_PER_TRANSACTION
(how can you find out the number of transactions?) Methods: b. Calculate the interest by
multiplying the LowestBalance by the 1. public VisaAccount ( double balance =, double
creditlimit =1200 ) INTEREST_RATE and then dividing by 12 - This public constructor takes a
parameter of type double representing the starting c. Update the Balance by adding the interest
and subtracting the service charge balance of the account and a double representing the credit
limit of this account. The d. transactions is re-initialized (use the Clear() method of the list class)
constructor does the following: This method does not take any parameters, nor does it display
anything a. It invokes the base constructor with the string "VS-" and the appropriate argument.
Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading,
hiding, and replacing members, Serialization, Generics, Ling hiding, and replacing members,
Serialization, Generies, linq [It uses the dictionary ACCOUNT_TYPE and the enum
AccountType to obtain the Bank class two letter prefix for this account type] You will
implement the Bank Class in Visual Studio. This is a static class where all its members are b.
Assigns the argument to the appropriate field also static. [All the members of a static class must
also be declared static.] A short description of 6. public void DoPayment(double amount, Person
person)-this public the class members is given below: method takes two arguments: a double
representing the amount to be deposited and a person object representing the person do the
transaction. This method does the following: a. Calls the Deposit () method of the base class with
the appropriate arguments. b. Calls the OnTransactionoccur () method of the base class with the
appropriate arguments. i. The second argument TransactionEventArgs needs the name of the
person, the amount and true (success of the operation). 2. public void DoPurchase( double
amount, Person person)-this public method takes two arguments: a double representing the
amount to be withdrawn and a person object representing the person do the transaction. The
method does the following: a. If this person in not associated with this account, it does the
following: i. Calls the OnTransactionOccur() method of the base class with the appropriate
arguments. Read the above Deposit() method for more explanation ii. Throws the appropriate
AccountException object b. If this person in not logged in, it does the following: i. Calls the
OnTransactionoccur() method of the base class with the appropriate arguments. ii. Throws the
appropriate AccountException object. c. If the withdrawal amount is greater than the balance and
there is no overdraft facility, it does the following: i. Calls the OnTransactionOccur () method of
the base class with the appropriate arguments. ii. Throws the appropriate AccountException
object. d. Otherwise it does the following: i. Calls the OnTransactionOccur() method of the base
class with the appropriate arguments. Fields: ii. calls the Deposit() method of the base class with
the appropriate 1. ACCOUNTS - this public readonly class variable is a dictionary of account. It
is initialized at arguments (you will send negative of the amount) declaration. 3. public override
void PrepareMonthlyReport( ) - this public method override 2. USERS - this public readonly
class variable is a dictionary of person. It is initialized at the method of the base class with the
same name. The method does the following: declaration. a. Calculate the interest by multiplying
the LowestBalance by the InterestRate and then dividing by 12 Methods: b. Update the Balance
by subtraction the interest 1. Static Bank( ) -This static constructor contains the following
statements to initialize c. Transactions is re-initialized the USERS and ACCOUNTS collections.
This method does not take any parameter nor does it display anything
Winter 2022 Assignment 4 Winter 2022 Assigniment 4, Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading. hiding, and replacing members,
Serialization, Generics, Linq hiding, and replacing members, Serialization, Generics, Linq
//initialize the USERS collection AddUserToAccount(number, "Vijay"); number = "sV-168897";
AddUserToAccount (number, "patrick"); AdduserToAccount (number, "Hao"); 2. public static
void PrintAccounts ( ) -this public static method displays all the accounts in the ACCOUNTS
collection 3. public static void PrintPersons ( ) -this public static method displays all the
//initialize the AcCouNTS collection persons in the USERS collection AddAccount(new
VisaAccount()); AddAccount (new VisaAccount (150,50) ); / /VSS-100e01 4. Public static
Person GetPerson( string name) -this public static method takes a string representing the name of
a person and returns the matching person object. AddAccount(new SavingAc count (5000) );
AddAccount (new SavingAccount ()); This method does the following: a. Check if the argument
is present in the key of the static collection USERS. AddAccount (new CheckingAccount (1580,
true)); / CK -100005 b. If the argument is present the value part of this pair is returned.
AddAccount(new SavingAccount (1000) ); ; SV-1080e7 c. Else the appropriate
AccountException object is thrown This method does not display anything on screen I/ associate
users with accounts string number = "Vs-189e0" 5. public static Account GetAccount( string
number) - this public static AddUserToAccount (number, "Narendra"); method takes a string
representing an account number and returns the matching account. This method does the
following: AdduserToAccount(number, "Mehrdad") ; a. Check if the argument is present in the
key of the static collection ACCOUNTS. number = "VS-180091"; b. If the argument is present
the value part of this pair is returned. AdduserToAccount(number, "Vijay");
AdduserToAccount(number, "Arben"); c. Else the appropriate AccountException object is
thrown AdduserToAccount(number, "Patrick"); 6. public static void AddPerson(string name,
string sin) -this method takes two strings and does the following: number ="5V100902";
AddUserToAccount(number, "Yin"); a. Creates a Person object with the two arguments.
AdduserToAccount(number, "Hao"); b. Add the static method LoginHandIer() of the Logger
class to the AdduserToAccount(number, "Jake"); Eventhandler field (OnLogin) of the above
object. number =5V169993 c. Adds a key-value pair to the USERS collection. The key is the
first argument and AddUserToAccount(number, "Mayy"); AdduserToAccount(number,
"Nicoletta") the value is the object in Step A respectively. 7. public static void
AddAccount(Account account)-this method takes an number = "CK-106064"
AdduserToAccount(number, "Mehrdad") account argument and does the following:
AddUserToAccount (number, "Arben"); a. Add the static method TransactionHandler() of the
Logger class to the AddUserToAccount (number, "Yin"); number = "CK-106005"; b. Adds a
key-value pair to the ACCOUNTS collection. The key is the Number AddUserToAccount
(number, "Jake"); AddUserToAccount (number, "Nicoletta") 8. public static void
AddUserToAccount(string number, string name) - number - -VS-1060e6"; this method takes two
string arguments and does the following: AddUser ToAccount (number, "Ilia"); a. Locates the
account matching the first argument.
Uses-Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading,
hiding, and replacing members, Serialization, Generics, Linq Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading. hiding, and replacing members,
Serialization, Generics, Linq b. Locates the person matching the second argument. Testing c.
Invokes the AddUser() method on the account object and passing the person Use the following
code in your test harness. object. Console. WriteLine("InA1I acounts:"); Bank.PrintAccounts();
console. Writeline("inall users:"); Bank.PrintPersons(); Person
p9,p1,p2,p3,p4,p5,p6,p7,p8,p9,p1; p= Bank.GetPerson ("Narendra"); p1= Bank.GetPerson
("Ilia"); 22= Bank.GetPerson("Mehrdad"); p3= Bank.GetPerson ("Vijay"); p4=
Bank.GetPerson("Arben"); 6= Bank.GetPerson ("Yin"); 7= Bank.GetPerson ("Hao"); p8=
Bank.GetPerson ("Jake"); p9= Bank.GetPerson ("Mayy"); p10 = Bank.GetPerson("Nicoletta");
pe. Login("123); p1. login("234"); p2. login("345); p3. Login("456); p10.Login("234"); p8.Login
("901"); I/a visa account VisaAccount a= Bank.GetAccount("VS- 1800) as VisaAccount; a.Pay
(15,p); a.Purchase (2,p1); a. Purchase (39,p1); a. Pay (4e,p); Console.Writeline(a); a= Bank.
GetAccount("VS-1000e1") as VisaAccount; a. Pay(5,p); a. Purchase (25,p3); a.Purchase (20,p4);
a. Purchase(15, p5); //a saving account SavingAccount b = Bank.GetAccount ("SV-10002") as
SavingAccount; b. Withdraw (300, p6); b. Withdraw (32,90,p6); b. withdraw (50,p7) : b.
Withdraw (111,11,p8); console.WriteLine(b); b = Bank.GetAccount ("SV-100e3") as
SavingAccount; b.Deposit (300, p3); //ok even though p3 is not a holder
Assignment 4, Winter 2022 Assignment 4, Winter 2022 Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members,
Serialization, Generics, Linq b.Deposit (32.90,p2); b.Deposit (50,p5); b. Withdraw(111.11, p1e);
Console.Writeline(b); try //a checking account CheckingAccount C= Bank.GetAccount("CK-
100004") as checkingAccount; catch (AccountException e) {Console.Writeline(e.Message); }
c.Deposit (33.33,p7); try c.Deposit (48.44,p7); c. Withdraw (150,p2); {= c.Withdraw (1500,p6);
//no overdraft c. Withdraw (200,p4); catch (AccountException e) { Console.
Writeline(e.Message); } c.Withdraw (645,p6); Console.Writeline(c); c= Bank.GetAccount
("CK-180005") as checkingAccount; {try{Bank.GetAccount("CK-
109018");//accountdoesnotexist c.Deposit(33.33, p8); c.Deposit (48.44,p7); c. Withdraw
(450,p1); c. Withdraw (500,p8); c.Withdraw (645,p1); c.Withdraw (85,p1); Console.Writel
ine(c); a = Bank.GetAccount ("VS-1006") as VisaAccount; a.Pay (76,p); a.Purchase (20,p3);
a.Purchase (10,p1); a.Purchase (15,p1); b= Bank.GetAccount ("SV-108e7") as SavingAccount;
b.Deposit (300, p3); //ok even though p3 is not a holder b.Deposit (32.90, p2); b.Deposit (50,p5);
console.Writeline(b); Console. Writeline("InnExceptions:"); //The following will cause
exception try { p8.Login("911"); //incorrect password } catch (AccountException e) {
Console.writeline(e.Message); }
hiding, and replacing members, Serialization, Generics, Linq VS-
100901$25.00withdrawnbyVijayon2021-88-2823:55hiding,andreplacingmembers,Serialization,
Generics,Linq Sample output VS-109001 $15, 90 withdrawn by Patrick on 2021-99-93 93:46
Use the following code in your test harness. SV-10002 Yin Logged in, Hao Logged in, Jake
Logged in $4,505.99 - transactions (4) SV-100e2 $300.80 withdrawn by Y in on 2821-89-84
20:23 SV-100002 $32.90 withdrawn by Yin on 2021-09-65 17:11 SV-100002 $50,08
withdrawn by Hao on 2021-09-07 68:54 A11 acounts: SV-100803 Mayy Not logged in,
Nicoletta Logged in $271.79 - transactions (4) [VS-100000, VS-100000 Narendra Not logged in,
Ilia Not logged in, Mehrdad Not SV-100603 $300.80 deposited by Vijay on 2821-69-18 18:14
logged in $. - transactions (B) SV-100003 $32.90 deposited by Mehrdad on 2021-89-12 28:28
[VS-100001, VS-100001 Vijay Not logged in, Arben Not logged in, Patrick Not SV-100003
$50.80 deposited by Patrick on 2021-99-13 66:52 SV-100003 $111.11 withdrawn by Nicoletta
on 2021-99-15 6e:51 logged in $150. - transactions () CK-1000e4 Mehrdad Logged in, Arben
Logged in, Yin Logged in $728.77 - transactions (6) [SV-1008e2, SV-10002 Yin Not logged in,
Hao Not logged in, Jake Not logged in CK-100004 $33.33 deposited by Hao on 2021-89-16
10:4e $5,8. - transactions () CK-10804 $40.44 deposited by Hao on 2821-89-18 93:03 CK-
100004 $150.00 withdrawn by Mehrdad on 2821-09-20 17:27 [SV-100e3, SV-108003 Mayy Not
logged in, Nicoletta Not logged in $. - CK-100004 $200.80 withdrawn by Arben on 2021-89-22
19:01 transactions () CK-100004 $645.00 withdrawn by Yin on 2821-09-25 82:44 [CK-100e04,
CK-100004 Mehrdad Not logged in, Arben Not logged in, Yin Not logged CK-100004 $350.00
withdrawn by Yin on 2021-09-27 10:29 CK-100005 Jake Logged in, Nicoletta Logged in -
$871.23 - transactions (6) CK-108005 $33.33 deposited by Jake on 2021-99-28 86:51 CK-
100005 $48.44 deposited by Hao on 2921992967:34 [CK-16805, CK-180805 Jake Not logged
in, Nicoletta Not logged in $1,500.00 - CK-100005 $450.00 withdrawn by Nicoletta on
2021-99-30 96:07 transactions (e) CK-100005 $500.00 withdrawn by Jake on 2021-10-81 13:11
[VS-109006, VS-100006 Ilia Not logged in, Vijay Not logged in $50.00 - CK-108005 $645.00
withdrawn by Nicoletta on 2021-10-02 12:47 CK-108005 $850.00 withdrawn by Nicoletta on
2021-10-83 21:54 VS-100006 Ilia Logged in, Vijay Logged in $785.00 - transactions (4) [SV-
100e7, SV-10807 Patrick Not logged in, Hao Not logged in $1,0. - VS-10006 $700.00 deposited
by Narendra on 2021-10-05 15:16 VS-100006 $20.00 withdrawn by Vijay on 221100605:47 VS-
100006 $15.90 withdrawn by Ilia on 2021-10-89 98:31 SV-1000e7 Patrick Logged in, Hao
Logged in $1,271.79 - transactions (4) A11 Users: SV-100007 $300.00 deposited by Vijay on
221110 of:31 [Narendra, Narendra Not logged in] SV-100007 $32.90 deposited by Mehrdad on
2021-10-11 13:55 [Ilia, Ilia Not logged in] SV-100007 $50.00 deposited by Patrick on 2021-10-
12 14:84 [Mehrdad, Mehrdad Not logged in] SV-100007 $111.11 withdrawn by Hao on
2021-10-13 11:58 [Vijay, Vijay Not logged in] [Arben, Arben Not logged in] [Patrick, Patrick
Not logged in] Exceptions: PASSWORD INCORRECT [Yin, Yin Not logged in] USER
NOT_LOGGED IN [Jake, Jake Not logged in] NAME NOT ASSOCIATED WITH ACCOUNT
NAME NOT ASSOCIATED_WITH_ACCOUNT [Mayy, Mayy Not logged in]
NAME_NOT_ASSOCIATED_WITH_ACCOUNT VS-1088e Marendra Logged in, Ilia Logged
in, Mehrdad Logged in $1,621.00 - ACCOUNT DOES NOT EXIST
USER_DOES_NOT_EXIST transactions (6) VS-10080 $1,508, deposited by Narendra on
2021-08-18 05:10 VS 100000$200.60 withdrawn by Ilia on 2021-08-19 69:11 VS 100080$25.00
withdrawn by Mehrdad on 2021-08-20 01:39 VS 106000$15.00 withdrawn by Narendra on
2021-68-22 05:21 Al1 transactions VS-1000e $1,500,00 deposited by Narendra on 2021-88-18
85:10 VS 1000$200.00 withdrawn by Ilia on 2021-08-19 09:11 VS 108000$39.00 withdrawn by
Ilia on 2021-08-24 18:17 VS-10600e $460.00 deposited by Narendra on 2021-08-25 21:58 VS-
100000 $25.00 withdrawn by Mehrdad on 2021-08-20 01:39 VS-108801 Vijay Logged in,
Arben Logged in, Patrick Logged in $590.80 - transactions VS-100000 $15.00 withdrawn by
Narendra on 2021-08-22 05:21 VS-10000e $39.00 withdrawn by Ilia on 2021-08-24 18:17 (4)
V5-100801 $560.80 deposited by Narendra on 2021-08-27 60:39 VS-1000e0 $400.00 deposited
by Narendra on 2021-08-25 21:58
Assignment 4, Winter 2022 Assignment 4, Winter 2022 Uses-Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces,
Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members,
Serialization, Generics, Linq hiding, and replacing members, Serialization, Generics, Ling VS-
100e01 $500.00 deposited by Narendra on 2021-08-27 80:39 VS-1080e1 $25.8 withdrawn by
Vijay on 2821-88-28 23:55 VS-100001 Vijay Not logged in, Arben Logged in, Patrick Logged in
$619.92 transactions () SV-108002 $300.00 withdrawn by Y in on 2021-89-84 20:23 Before
PrepareMonthlyReport() SV-100e02 $32.98 withdrawn by Yin on 2021-09-05 17:11 SV-180002
Yin Logged in, Hao Logged in, Jake Not logged in $4,505.99 - transactions SV-1000e2 $111.11
withdrawn by Jake on 2021-09-08 16:16 (4) SV- 183$30.0 deposited by Vijay on 2021- 9118:14
SV-108002 $32.90 withdrawn by Y in on 2021-09-05 17:11 SV-10008 $50.08 withdrawn by
Hao on 2021-09-07 68:54 SV-108003 $50.08 deposited by Patrick on $111.11 withdrawn by
Nicoletta on 2021-09-15 8:51 CK-108084 $33.33 deposited by Hao on 2021-09-16 10:40 After
PrepareMonthlyReport () CK-100e4 $4.44 deposited by Hao on 2021-09-18 03;03 CK-108084
$150.00 withdrawn by Mehrdad on 2021-09-20 17:27 SV-108002 Yin Logged in, Hao Logged
in, Jake Not logged in $4,573.38 - transactions CK-1800e4 $200.80 withdrawn by Arben on
2021-09-22 19:01 (b) CK-1 10004$645.00 withdrawn by Yin on 2821- 89252:44 Before
PrepareMonthlyReport() CK-180005 $4.44 deposited by Hao on 2021- 892907:34 SV-100e3
Mayy Not logged in, Nicoletta Logged in $271.79 - transactions (4) CK-108085 $45.80
withdrawn by Nicoletta on 2021-09-30 86:07 SV-100003 $300.00 deposited by Vijay on 2021-
69-18 18:14 CK-188005 $500.80 withdrawn by Jake on 2821-10-01 13:11 CK-1880e5 $645.80
withdrawn by Nicoletta on 282118212;475S180003 $111, 11 withdrawn by Nicoletta on
2021-89-15 80:51 CK-1080es $850.80 withdrawn by Nicoletta on 2021-10-03 21:54 VS-188006
$700.80 deposited by Narendra on 2821-18-05 15:16 After PrepareMonthlyReport() VS-
1886$28.88 withdrawn by Vijay on 2021-10-06 85:47 SV-100003 Mayy Not logged in,
Nicoletta Logged in $271.59 - transactions ( ) VS-180886 $10.8 withdrawn by Ilia on
2021-18-87 19:54 VS-18808 $15.88 withdrawn by Ilia on 2821-10-89 88:31 VS-1080e6 $15.8
withdrawn by Ilia on 2021-10-89 88:31 Before PreparemonthlyReport() SV-1080e7 $32.90
deposited by Mehrdad on 2021-10-11 13:55 SV-1088e7 $5.88 deposited by Patrick on 2021-10-
12 14:84 SV-18807 $111.11 withdrawn by Hao on 2821-10-13 11:58 CK-1808e4 Mehrdad
Logged in, Arben Logged in, Yin Logged in $728.77 - transactions (6) CK-1000e4 $33.33
deposited by Hao on 2021-09-16 10:48 Before PrepareMonthlyReport () CK-100004 $46.44
deposited by Hao on 2021-09-18 03:03 VS-188e Narendra Logged in, Ilia Logged in, Mehrdad
Logged in $1,621.0 CK-100804 $200.00 withdrawn by Arben on 2021-09-22 19:01 transactions
(6) VS- 1800$200.80 withdrawn by Ilia on 2821-88-19 89:11 After PrepareMonthlyReport() VS-
108000$15.80 withdrawn by Narendra on 2821- 882205:21 VS- 18080$39.8 withdrawn by Ilia
on 2821-88-24 18:17 CK-108004 Mehrdad Logged in, Arben Logged in, Yin Logged in $732.11
- transactions After PrepareMonthlyReport() Before Preparemonthlyreport() VS-1888e Narendra
Logged in, Ilia Logged in, Mehrdad Logged in $1,621.80 transactions () CK-1800e5 Jake Not
logged in, Nicoletta Logged in - $871.23 - transactions (6) Before PrepareMonthlyReport () CK-
1080005 $50.00 withdrawn by Jake on 2021-10-01 13:11 vS-1001 Vijay Not logged in, Arben
Logged in, Patrick Logged in $590.8. transactions (4) CK-1080es $645.00 withdrawn by
Nicoletta on 2021-10-82 12:47 VS-188001 $580.80 deposited by Narendra on 2021-08-27
80:39CK105$850.00 withdrawn by Nicoletta on 2021-10-83 21:54 VS-180801 $25.00
withdrawn by vijay on 2821-88-28 23:55 After PrepareMonthlyReport ( VS-188801 $2.08
withdrawn by Arben on 2821-89-81 89:51 VS-100001 $15.88 withdrawn by Patrick on 2021-09-
83 83:46 CK-1000e5 Jake Not logged in, Nicoletta Logged in - $875.89 - transactions (0) After
PrepareMonthlyReport() Before PrepareMonthlyReport()
Assignment 4, Winter 2022 Assignment 4, ders, Collections Operator overloading, Uses -
Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding,
and replacing members, Serialization, Generics, Ling hiding, and replacing members,
Serialization, Generics, Linq VS-100006 Ilia Logged in, Vijay Not logged in $705.00 -
transactions (4) 21 Mehrdad deposit $150.08 successfully on 2821-89-19 11:17 VS-10806 $70.0
deposited by Narendra on 2021-10-05 15:16 VS- 180006$20.00 withdrawn by Vijay on 2021-
10-06 05:47 23 Yin deposit $645.80 successfully on 2821-89-23 21:42 VS- 180006$18.80
withdrawn by Ilia on 2821-10-87 19:54 24 Yin deposit $350.80 successfully on 2021-09-26
84:27 25 Jake deposit $33.33 successfully on 2821-09-27 22:25 After PrepareMonthlyReport()
27 Nicoletta deposit $450.80 successfully on 2021-09-30 84:37 VS-108006 Ilia Logged in, Vijay
Not logged in $714.98 - transactions ( ) 28 Jake deposit $500.80 successfully on 2021-69-30
17:15 29 Nicoletta deposit $645.00 successfully on 2021-10-02 88:42 30 Nicoletta deposit
$850.00 successfully on 2821-18-02 22:48 Before PrepareMonthlyReport() 31 Narendra deposit
$78.8 successfully on 2021-10-84 20:47 SV-10807 Patrick Logged in, Hao Logged in $1,271.79
- transactions (4) 32Vijay deposit $2.00 successfully on 2021-10-85 21:84 SV-188007 $32.90
deposited by Mehrdad on 2021-10-11 13:55 33 Ilia deposit $1.00 successfully on 2021-10-86
23:51 34 Ilia deposit $15.0 successfully on 2021-10-08 06:25 SV-10007 $50.00 deposited by
Patrick on 2021-10-12 14:04 36 Mehrdad deposit $32.90 successfully on 2021-10-11 05:38 37
Patrick deposit $50.80 successfully on 2021-10-12 96:37 After PrepareMonthlyReport() 38 Hao
deposit $111.11 successfully on 2021-10-13 10:12 SV-108e7 Patrick Logged in, Hao Logged in
$1,286.59 - transaction5 ( ) 39 Vijay deposit $12.50 unsuccessfully on 2821-10-15 18:24 40
Narendra deposit $12.50 unsuccessfully on 2021-10-16 14:19 41 Arben deposit $5,825.08
unsuccessfully on 2821-10-17 13:56 42 Yin deposit $1,58.80 unsuccessfully on 2021-18-18
85:02 Login events as of 2021-10-18 05:02 1 Narendra logged in successfully on 2021-88-89
21:24 2 Ilia logged in successfully on 2021-08-11 88:02 3 Mehrdad logged in successfully on
2021-08-12 89:15 4 Vijay logged in successfully on 2021- 88135:23 5 Arben logged in
successfully on 2021-88-13 15:16 6 Patrick logged in successfully on 2021- 881489:14 7 Yin
logged in successfully on 2021-08-14 22:32 8 Hao logged in successfully on 2021-88-15 12:4e 9
Nicoletta logged in successfully on 2021-08-15 20:23 18 Jake logged in successfully on 2021-
88-16 16:08 11 Jake logged in unsuccessfully on 2021-10-14 81:59 Transaction events as of
2021-10-18 65:02 1 Narendra deposit $1,500.00 successfully on 2021-08-17 07:05 2 Ilia deposit
$20.00 successfully on 2021-08-18 19:58 3 Mehrdad deposit $25.00 successfully on 2021-08-19
12:26 4 Narendra deposit $15.00 successfully on 2021-08-21 05:58 5 Ilia deposit $39.60
successfully on 2021-08-23 14:17 6 Narendra deposit $400.00 successfully on 2021-08-25 06:04
7 Narendra deposit $500.00 successfully on 2021-08-26 83:11 8 Vijay deposit $25.80
successfully on 2021-08-27 16:59 9 Arben deposit $20.00 successfully on 2021-08-30 85:42 16
Patrick deposit $15.00 successfully on 2021-09-01 22:08 11 Yin deposit $300.00 successfully on
2021-09-04 13:01 12 Yin deposit $32.90 successfully on 2021-09-05 11:14 13 Hao deposit
$50.00 successfully on 2021-09-06 67:43 14 Jake deposit $111.11 successfully on 2021-09-07
12:20 15 Vijay deposit $30.60 successfully on 2021-09-09 14:05 16 Mehrdad deposit $32.90
successfully on 2021-09-11 16:50 18 Nicoletta deposit $111.11 successfully on 2021-09-13
23:30 19 Hao deposit $33.33 successfully on 2021-09-16 98:38 20 Hao deposit $4.44
successfully on 2021-09-17 01:40
Assignment 4, Winter 2022 Uses - Inheritance, Interfaces, Exceptions, EventHandlers,
Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Linq
Appendix Copy the following statements to your Utils class //this class depends of the
implementation of the following types: //DayTime struct and AccountType enum public static
class Utils { static DayTime time = new DayTime (1048_00_00); static Random random = new
Random(); public static DayTime Time { get time += random.Next (18); } public static
DayTime Now { get time +=; public readonly static Dictionary ACCOUNT TYPES = new
Dictionary f { AccountType.checking, "cK" }, { AccountType. Saving , "sv" },
{AccountType. Visa, vis } };

More Related Content

Similar to Programming II hiding, and .pdf

C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
lavparmar007
 
Assignment Examples Final 07 Oct
Assignment Examples Final 07 OctAssignment Examples Final 07 Oct
Assignment Examples Final 07 OctSriram Raj
 
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
Diana Gray, MBA
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
Kuntal Bhowmick
 
CiIC4010-chapter-2-f17
CiIC4010-chapter-2-f17CiIC4010-chapter-2-f17
CiIC4010-chapter-2-f17
BienvenidoVelezUPR
 
Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6helpido9
 
Oopp Lab Work
Oopp Lab WorkOopp Lab Work
Oopp Lab Work
Heather Dionne
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
JOSEPHINEA6
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)Jay Patel
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
Pankhuree Srivastava
 
Chapter 1 Presentation
Chapter 1 PresentationChapter 1 Presentation
Chapter 1 Presentation
guest0d6229
 
Review of c_sharp2_features_part_ii
Review of c_sharp2_features_part_iiReview of c_sharp2_features_part_ii
Review of c_sharp2_features_part_ii
Nico Ludwig
 
Ch03
Ch03Ch03
Ch03
ojac wdaj
 
Object oriented concepts & programming (2620003)
Object oriented concepts & programming (2620003)Object oriented concepts & programming (2620003)
Object oriented concepts & programming (2620003)nirajmandaliya
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
Kuntal Bhowmick
 
IRJET- Implementation and Unittests of AWS, Google Storage (Cloud) and Am...
IRJET-  	  Implementation and Unittests of AWS, Google Storage (Cloud) and Am...IRJET-  	  Implementation and Unittests of AWS, Google Storage (Cloud) and Am...
IRJET- Implementation and Unittests of AWS, Google Storage (Cloud) and Am...
IRJET Journal
 
Introduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptxIntroduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptx
esuEthopi
 
UNIT III (2).ppt
UNIT III (2).pptUNIT III (2).ppt
UNIT III (2).ppt
VGaneshKarthikeyan
 

Similar to Programming II hiding, and .pdf (20)

C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
Assignment Examples Final 07 Oct
Assignment Examples Final 07 OctAssignment Examples Final 07 Oct
Assignment Examples Final 07 Oct
 
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
 
CiIC4010-chapter-2-f17
CiIC4010-chapter-2-f17CiIC4010-chapter-2-f17
CiIC4010-chapter-2-f17
 
Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6Cis 355 i lab 3 of 6
Cis 355 i lab 3 of 6
 
Oopp Lab Work
Oopp Lab WorkOopp Lab Work
Oopp Lab Work
 
Vb6.0 intro
Vb6.0 introVb6.0 intro
Vb6.0 intro
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Chapter 1 Presentation
Chapter 1 PresentationChapter 1 Presentation
Chapter 1 Presentation
 
Java reflection
Java reflectionJava reflection
Java reflection
 
Review of c_sharp2_features_part_ii
Review of c_sharp2_features_part_iiReview of c_sharp2_features_part_ii
Review of c_sharp2_features_part_ii
 
Ch03
Ch03Ch03
Ch03
 
Ch03
Ch03Ch03
Ch03
 
Object oriented concepts & programming (2620003)
Object oriented concepts & programming (2620003)Object oriented concepts & programming (2620003)
Object oriented concepts & programming (2620003)
 
Class notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methodsClass notes(week 3) on class objects and methods
Class notes(week 3) on class objects and methods
 
IRJET- Implementation and Unittests of AWS, Google Storage (Cloud) and Am...
IRJET-  	  Implementation and Unittests of AWS, Google Storage (Cloud) and Am...IRJET-  	  Implementation and Unittests of AWS, Google Storage (Cloud) and Am...
IRJET- Implementation and Unittests of AWS, Google Storage (Cloud) and Am...
 
Introduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptxIntroduction to Data Structure and algorithm.pptx
Introduction to Data Structure and algorithm.pptx
 
UNIT III (2).ppt
UNIT III (2).pptUNIT III (2).ppt
UNIT III (2).ppt
 

More from aludin007

Problem 4 Suppose that the government sets an emission fee of $8000.pdf
 Problem 4 Suppose that the government sets an emission fee of $8000.pdf Problem 4 Suppose that the government sets an emission fee of $8000.pdf
Problem 4 Suppose that the government sets an emission fee of $8000.pdf
aludin007
 
Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
 Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
aludin007
 
Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
 Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
aludin007
 
Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
 Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
aludin007
 
Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
 Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
aludin007
 
Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
 Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
aludin007
 
Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
 Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
aludin007
 
Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
 Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
aludin007
 
Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
 Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
aludin007
 
Problem 2. The random variables X and Y have joint probability densil.pdf
 Problem 2. The random variables X and Y have joint probability densil.pdf Problem 2. The random variables X and Y have joint probability densil.pdf
Problem 2. The random variables X and Y have joint probability densil.pdf
aludin007
 
Problem 3. Using the Probability mass function found below, construct.pdf
 Problem 3. Using the Probability mass function found below, construct.pdf Problem 3. Using the Probability mass function found below, construct.pdf
Problem 3. Using the Probability mass function found below, construct.pdf
aludin007
 
Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
 Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
aludin007
 
Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
 Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
aludin007
 
Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
 Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
aludin007
 
Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
 Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
aludin007
 
Problem 2. Solve the following linear problem using the Dual Simplex .pdf
 Problem 2. Solve the following linear problem using the Dual Simplex .pdf Problem 2. Solve the following linear problem using the Dual Simplex .pdf
Problem 2. Solve the following linear problem using the Dual Simplex .pdf
aludin007
 
Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
 Problem 4 (10 pts) Write a complete C program and create a user defi.pdf Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
aludin007
 
Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
 Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
aludin007
 
Procedure #2 The experiment has been set up for you. You will observ.pdf
 Procedure #2 The experiment has been set up for you. You will observ.pdf Procedure #2 The experiment has been set up for you. You will observ.pdf
Procedure #2 The experiment has been set up for you. You will observ.pdf
aludin007
 
Problem Susan Sound predicts that students will learn most effective.pdf
 Problem Susan Sound predicts that students will learn most effective.pdf Problem Susan Sound predicts that students will learn most effective.pdf
Problem Susan Sound predicts that students will learn most effective.pdf
aludin007
 

More from aludin007 (20)

Problem 4 Suppose that the government sets an emission fee of $8000.pdf
 Problem 4 Suppose that the government sets an emission fee of $8000.pdf Problem 4 Suppose that the government sets an emission fee of $8000.pdf
Problem 4 Suppose that the government sets an emission fee of $8000.pdf
 
Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
 Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
Problem 5 Prove or disprove the statement n!2n for all integers n1..pdf
 
Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
 Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
Problem 5 A $1,000 bond with a 4 years life is paying a semiannual co.pdf
 
Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
 Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
Problem 5 (16 points) Jack and Jill Smith have just retired and want.pdf
 
Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
 Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
Problem 4. Radix Sort Q4. Select all properties of the radix sort. ru.pdf
 
Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
 Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
Problem 4. Bubble Sort Q2. Select all properties of the bubble sort. .pdf
 
Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
 Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
Problem 4. (20 marks) Let a message M of 128 bits be encrypted with 1.pdf
 
Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
 Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
Problem 3. (Central Limit Theorem Step 2) Let X be a mean 0 variance.pdf
 
Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
 Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
Problem 3 a) A portfolio consisting of Stocks 1 and 2 has an expected.pdf
 
Problem 2. The random variables X and Y have joint probability densil.pdf
 Problem 2. The random variables X and Y have joint probability densil.pdf Problem 2. The random variables X and Y have joint probability densil.pdf
Problem 2. The random variables X and Y have joint probability densil.pdf
 
Problem 3. Using the Probability mass function found below, construct.pdf
 Problem 3. Using the Probability mass function found below, construct.pdf Problem 3. Using the Probability mass function found below, construct.pdf
Problem 3. Using the Probability mass function found below, construct.pdf
 
Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
 Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
Problem 2. Prove that the language L2={aib2ii0} is not regular langua.pdf
 
Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
 Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
Problem 4 Let X be a uniform (0,1) random variable, and let Y=eX. a. .pdf
 
Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
 Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
Problem 3. Graph Q2. Match the graphs with their descriptions. DAG [C.pdf
 
Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
 Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
Problem 3. Tree Q1. Choose yes or no to the following statements abou.pdf
 
Problem 2. Solve the following linear problem using the Dual Simplex .pdf
 Problem 2. Solve the following linear problem using the Dual Simplex .pdf Problem 2. Solve the following linear problem using the Dual Simplex .pdf
Problem 2. Solve the following linear problem using the Dual Simplex .pdf
 
Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
 Problem 4 (10 pts) Write a complete C program and create a user defi.pdf Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
Problem 4 (10 pts) Write a complete C program and create a user defi.pdf
 
Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
 Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
Problem 4 (p. 219#12 ). Let W1 and W2 be independent geometric random.pdf
 
Procedure #2 The experiment has been set up for you. You will observ.pdf
 Procedure #2 The experiment has been set up for you. You will observ.pdf Procedure #2 The experiment has been set up for you. You will observ.pdf
Procedure #2 The experiment has been set up for you. You will observ.pdf
 
Problem Susan Sound predicts that students will learn most effective.pdf
 Problem Susan Sound predicts that students will learn most effective.pdf Problem Susan Sound predicts that students will learn most effective.pdf
Problem Susan Sound predicts that students will learn most effective.pdf
 

Recently uploaded

CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 

Recently uploaded (20)

CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 

Programming II hiding, and .pdf

  • 1. Programming II hiding, and replacing members, Serialization, Generics, Linq ExceptionType enum You will implement this enum in Visual Studio. There are seven members: Assignment 4 - Implementing a Banking Application Due: See course shell for due date and time Check with you professor to see if you are permitted to work as a group. The members are self-explanatory. AccountType enum You will implement this enum in Visual Studio. There are three members: The application is by far the most complex system that you have attempted so far. It consists of eleven classes, two structs, one interface and two enums coupled in varying degrees of tightness. The Bank class is the main driver of the application. It has collection of Accounts and Person that is initialize appropriately in the static constructor. You will implement the entire system in Visual Studio. A short description of each type with their members is given below. You are advised to implement each type in the order that they are described. No method should have a Console. WriteLine() unless you are explicitly told to output something on the console. Each type must be in separate files. Assignment 4, Winter 2022 Assignment 4, Winter 2022 hiding, and replacing members,
  • 2. Serialization, Generics, ling Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Utils class hiding, and replacing members, Serialization, Generics, Ling [The implementation for this class is given in the appendix. Create a class called UtIs and copy and 1. Time - this public class variable is of type Day Time. It adds a random value to the internal field_time and then returns it. past the statements into the appropriate part of the file] 2. Now - this public class variable is of type Day Time. It adds zero to the internal field_time You will implement the Utils class in Visual Studio. This class is comprised of three fields and and then returns it. provides two static properties. It simulates the passage of time. Each time the Time property is Methods: accessed, it increases the internal field by a random amount. It is used to time stamped all banking There are no explicitly defined methods. You do not have to code this class. Just copy the code statements from the appendix of this A short description of each dass member is given below: document. Properties: There are three properties. 1. _time - this private class variable is of type DayTime that store the time of this object. It is initialized (with argument 1_648_600_800 ) at declaration. It is mutated (changed) whenever either of the properties is accessed. 2. random - this private class variable is of type Random storing the time of this object. It is initialized (with argument 1_848_800_800) at declaration. It is mutated (changed) whenever elther of the properties is accessed. 3. ACCOUNT_TYPE - this private class variable is of type Dictionary. It serves as a lookup table to match an account type with a particular prefix, It is initialized (code is given in the appendix) at declaration. Properties: There are two properties, both of which are computed. Assignment 4, Winter 2022 Assignment 4, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, Event Handlers, Collections Operator averloading, hiding, and replacing members, Serialization, Generics, Ling hiding, and replacing members, Serialization, Generics, Linq ITransaction interface AccountException class You will implement the ITransaction Interface in Visual Studio. The three Account sub classes You will implement the AccountException Class in Visual Studio. This inherits from the Exception implement this interface. Class to provide a custom exception object for this application. It consists of a single a constructor: A short description of each class member is given below: Fields: Properties: There are no fields There are no properties. Properties: Methods: There are no properties 1. void Withdraw(double amount, Person person). 2 void Deposit(double amount, Person person). Constructor: 1. public AccountException(ExceptionType reason )-this public constructor invokes the base constructor with an appropriate argument. The base constructer argument is obtain by calling the Tostring() of the argument. [You are sending the argument of the child constructor to the parent constructor.] Methods: There are no methods.
  • 3. Winter 2022 Assigniment 4, Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, and replacing members, Serialization, Generics, Ling hiding, and replacing members, Serialization, Generics, Linq TransactionEventArgs class Il implement the LoginEventArgs Class in Visual Studio. This inherits from the You will implement the TransactionEventArgs Class in Visual Studio. This inherits from the Args Class to provide a custom object for this application. It consists of two properties and LoginEventArgs Class to provide a custom object for this application. It consists of a single e a constructor: property and a single a constructor: Fields: There are no fields Properties: here are two public properties, with no accompanying setters. There is one explicitly defined public property, with no accompanying setters. Constructors: onstructors: 1. public LoginEventArgs (string name, bool success) - this public constructor 1. public TransactionEventArgs(string name, amount, takes a string and a bool argument and does the following: success ) - this public constructor takes a string, a double and a bool argument and does the following: a. Invokes the base constructor b. Assigns the arguments to the appropriate properties. a. Invokes the base constructor with the appropriate arguments. b. Assigns the middle argument to the appropriate property. Methods: Methods: There are no explicitly defined methods. There are no explicitly defined methods. Assignment 4 Winter 2022 Assigniment 4, Winter 2022 Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Ling hiding, and repla Transaction struct You will implement the Transaction struct in Visual Studio. The only purpose of this stuct is to 1. pubiic Transaction( string accountNumber, double amount, Person capture the data values for each transaction. A short description of the struct members is given person) - This public constructor takes three arguments. It assigns the arguments to the below: appropriate properties. It also sets the Time property to the Time property of the Utils class. Methods: 1. public override string Tostring( ) - This method overrides the same method of the Object class. It does not take any parameter and it returns a string representing the account number, name of the person, the amount, and the time that this transition was completed. [See the output for clues for this method.] You must include the word Deposit or Withdraw in the output. Properties: There are no fields. Properties? All the properties are public with the setter absent 1. AccountNumber - this property is a string representing the account number associated with this transaction. The getter is public, and the setter is absent. 2. Amount - this property is a double representing the account of this transaction. The getter is public, and the setter is absent. 3. Originator - this property is a Person representing
  • 4. the person initiating this transaction. The getter is public, and the setter is absent. 4. Time - this property is a DayTime type representing the time associated with this transaction. The getter is public, and the setter is absent. Assignment 4, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Assignment 4, Assignment 4, hiding, and replacing members, Serialization, Generics, Linq DayTime struct hiding, and replacing members, Serialization, Generics, Linq Constructors: You will implement the DayTime struct in Visual Studio. The only purpose of this stuct is to capture the time of an event. 1. public Day( long minutes) - This public constructor takes a single long argument and assigns it to the appropriate field. The logic of this class depends on the following: Methods: - 1 hour =60 minutes 1. Public static DayTime operator + ( DayTime lhs, int minutes ) - This - 1 day =24 hours =2460=1_440 minutes method overload the addition operator. Returns a new struct with the original minutes - 1 month =30 days =30=1_440=43_200 minutes that is increased by the second argument. This is used in the Util class to get the current - 1 year =12 months =1243_200=518_400 minutes time (Utils . Now) and incremented time (Utils . Time). - Time starts on the zero minute of the zero hour of the first day of the first month of the 2. public override string Tostring( ) -This method overrides the same method zero year. i.e. 0 minute will be 11: of the Object class. It calculates the year, month, day, hour, and remaining minutes from the private minutes field. [See the output for clues for this methad.] A short description of the struct members is given below: Properties: There is a single private field. 1. minutes - this private field is a long representing the minute value of this struct. [The time on a computer system is a simple counter. The long counter represents the number of ticks (milliseconds) since 1970 January 1] Properties: There are no properties. Assignment 4, Assignment 4 Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Winter 2022 hiding, and replacing members, Serialization, Generics, Linq Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Logger class hiding, and replacing members, Serialization, Generics, Ling Methods: You will implement the Logger Class in Visual Studio. This is a static class with some housekeeping 1. public static void LoginHandler(object sender, EventArgs args)-This duties. It handles all login attempts and transaction occurrences. method does the following: A short description of each class member is given below: a. Uses the as operator to cast the second argument to a LoginEventArgs object. b. Create a string with the following: - PersonName (from args). - Success (from args). - Current time (from Utils . Now). c. Adds the above string to the loginEvents collection. This method does not display anything 2. public static void TransactionHandler(object sender, EventArgs args) - This method does the following: a. Uses
  • 5. the as operator to cast the second argument to a TransactionEventArgs object. b. Create a string with the following: - PersonName (from args). - Amount (from args) - Operation (from Amount in args) - Success (from args). - Current time (from Utils . Now). c. Adds the above string to the transactionEvents collection. This method does not display anything 3. public static void ShowloginEvents( ) - This is method does not take any parameters nor does it return a value. The method does the following: a. Prints the current time (Utils. Now) b. Prints a number list of all the items in the loginEvents collection. 4. public static void ShowTransactionEvents ( ) - This is method does not take Fields: any parameters nor does it return a value. The method does the following: There are two fields: a. Prints the current time (Utils. Now) 1. LoginEvents - this private static Listfield represents login attempts to the bank. This is initialized to an empty collection at declaration. 2. transactionEvents - this private static Listfield represents login attempts to the bank. This is initialized to an empty collection at declaration. Properties: There are no properties. Assignment 4, Winter 2022 Assignment 4, Winter 2022 Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Ling hiding, and replacing members, Serialization, Generics, Ling Person class 1. SIN - this string property represents the sin number of this person. The getter is public, You will implement the Person Class in Visual Studio. A person object may be associated with and setter is absent. multiple accounts. A person initiates activities (deposits or withdrawal) against an account that is 2. Name - this property is a string representing the name of this person. This getter is captured in a transaction object. public, and setter is absent. 3. IsAuthenticated - this property is a bool representing if this person is logged in with A short description of each class member is given below: the correct password. This is modified in the Login () and the Logout() methods. This getter is public, and setter is absent. Constructors: 1. public Person(string name, string sin)-This public constructor takes two parameters: a string representing the name of the person and another string representing the SIN of this person. It does the following: a. The method assigns the arguments to the appropriate fields. b. It also sets the password field to the first three letters of the SIN. [use the Substring (start position, length) method of the string class] Methods: 6. public void Login(string password) - This method takes a string parameter representing a password and does the following: a. If the argument DOES NOT match the password field, it does the following: - Sets the IsAuthenticated property to false - Invokes the EventHandler OnLogin with the following arguments: o The current object reference (use this) - The second argument is of type LoginEventArgs. This will have arguments - the name of the current object - and the success on the operation (use false in this case). - Creates an
  • 6. AccountException object using argument AccountEnum.PASSWORD_INCORRECT - Throws the above exception Fields: b. If the argument matches the password, it does the following: There are two fields: - Sets the IsAuthenticated property is set to true 3. Password-this private string field represents the password of this person. - Invokes the EventHandler OnLogin with the following arguments: (N.B. Password are not normally stored as text but as a hash value. A hashing function - The current object reference (use this) operates on the password and the resulting hash value is stored. When a user supplies a - The second argument is of type LoginEventArgs. This will have password, it is passed through the same hashing function and the result is compared to arguments the stored value.) - the name of the current object 4. OnLogin - this public event field represents the EventHandler that will store the method to be invoked. This method does not display anything 7. public void Logout ( ) - This is public method does not take any parameters nor does it return a value. Assignment 4 Winter 2022 Assignment 4, Winter 2022 Uses-Inheritance, Interfaces, Exceptions, Eventhandlers, Collections Operator overloading. Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Linq hiding, and replacing members, Serialization, Generics, Linq 2. transactions - this readonly puble field is a list of transaction representing the a. Increase (or decrease) the property Balance by the amount specified by its deposits, withdrawal, payments and purchases of this account. This initialized at in the argument. constructor to an empty collection. b. Update the property LowestBalance based on the current value of Balance. 3. LAST_NUMBER - this private field is a class variable of type int. It represents the last c. Create a Transaction object based on the account Number, the amount (specified account number that was used to generate the unique account number. It is initialized at by the argument), a person object (specified by the argument. declaration to 100,000 and is modify in the constructor. d. Adds the above object to the list of transactions This is method is called by the Deposit and Withdraw methods of the derived classes Properties: CheckingAccount and SavingsAccount as well as the DoPurchase and DoPayment 1. Balance-this property is a double representing the amount in this account. This is of the VisaAccount class. modified in the Deposit () method and in the PrepareMonthlyReport () method of This method does not display anything, nor does it return a value. the derived classes. This is an auto-implemented property the getter is public and the 3. public void AddUser( Person person ) - This public method takes a person setter is protected object as a parameter. It adds the argument to holders (the list of persons). This method 2. LowestBalance - this property is a double representing the lowest balance that this does not return a value, nor does it display
  • 7. anything on the screen. amount ever drops to. This is modified in the Deposit() method. This is an autoimplemented property the getter is public and the setter is protected 3. Number-this property is a string representing the account number of this account. The getter is public and the setter is absent. 4. Public bool IsUser( string name )-This public method that takes a string parameter representing the name of the user and returns true if the argument matches the name of a person in holders is not a sound design users will have the same name (the list of persons) and false otherwise. Events: 1. OnTransaction - this event is a double representing the amount in this account. This is You cannot use the Contains method of the list class because the list is a list of persons modified in the Deposit () method and in the PrepareMonthlyReport () method of and not a list of strings. You will have to use a loop to check each persen in the collection. the derived classes. This is an auto-implemented property the getter is public and the Use linq to implement this method. setter is protected This method does not display anything on screen. 5. public abstract void PrepareMonthlyReport( )-This abstract public method does not take any parameter nor does it return a value. Research how to declare an abstract method. Methods: This method is implemented in the classes derived from Accounts. 1. public Account( string type, double balance) - This is the public 6. public virtual void OnTransactionOccur(object sender, EventArgs constructor. It takes two parameters: a three-letter string representing the type of the args) - This public method invoke the EventHandler OnTransaction with its two account ("VS_- ", "SV-" and "CK-" for visa, saving and checking account respectively) arguments. This method does not return a value, nor does it display anything on the and a double representing the starting balance. The method does the following: screen. a. Sets the Number property to the concatenation (joining) of the first argument and 7. public override string ToString( )-This method overrides the same method the class variable LastNumber of the Object class. It does not take any parameter but returns a string representation of b. Increments the class variable Last Number this account. It does the following: c. Assigns the second argument to the property Balance a. Declare and initialise a string variable to store the return value and add the d. Assigns the second argument to the property LowestBalance following to it: e. Initializes the field transactions to an empty list of Transactions. - The Number of this account f. Initializes the field users to an empty list of Persons. - The names of each of the users of the account This constructor is called in the constructors on the three derived classes 2. public void Deposit (double amount, Person person) -This public method - The Balance take a double parameter representing the amount to change balance by and a person - All the transactions object representing the person who is performing this transaction. This method does the following: Assignment 4, Winter 2022 Assighment 4 , Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses-Inheritance, Interfaces, Exceptions,
  • 8. EventHandlers, Collections Operator overloading. hiding, and replacing members Serialization, Generics, Ling hidirg, and replacing members, Serialization, Generics, Linq CheckingAccount class starting balance of the account and a bool indicating if this account has over draft You will implement the CheckingAccount Class in Visual Studio. This is a sub class is derived from permission. The constructor does the following: the Account class and implements the ITransaction interface. There are two class variables lie. a. It invokes the base constructor with the string "CK-" and the appropriate variables that are shared but all the objects of this class. A short description of the class members argument. is given below: [It uses the dictionary ACCOUNI_TYPE and the enum AccountType to obtain the two letter prefix for this account type] b. Assigns the hasoverdraft argument to the appropriate field. 2. Public new void Deposit(double amount, Person person)-this public method takes two arguments: a double representing the amount to be deposited and a person object representing the person do the This definition hides the corresponding transaction. The method does the following: member in the parent class because the base a. Calls the Deposit() method of the base class with the appropriate arguments. b. Calls the OnTransactionOccur() method of the base class with the appropriate arguments. i. The second argument TransactionEventArgs needs the name of the person, the amount and true (success of the operation) 3. public void Withdraw( double amount, Person person )-this public method takes two arguments: a double representing the amount to be withdrawn and a person object representing the person do the transaction. The method does the following: a. If this person in not associated with this account, it does the following: i. Calls the OnTransactionOccur() method of the base class with the appropriate arguments. Read the above Deposit() method for more explanation ii. Throws the appropriate AccountException object b. If this person in not logged in, it does the following: i. Calls the OnTransactionOccur() method of the base class with the appropriate arguments. ii. Throws the appropriate AccountException object. 1. COST_PER_TRANSACTION - this is a class variable of type double representing the unit c. If the withdrawal amount is greater than the balance and there is no overdraft facility, it does the following: cost per transaction. All of the objects on this class will have the same value. This class i. Calls the OnTransactionOccur() method of the base class with the variable is initialized to ,65. 2. INTEREST_RATE - this is a class variable of type double representing the annual interest appropriate arguments. rate. All of the objects on this class will have the same value. This class variable is ii. Throws the appropriate AccountException object. d. Otherwise, it does the following: initialized to 8.685 . 1. Calls the OnTransactionOccur() method of the base class with the 3. hasoverdraft - this is a bool indicating if the balance on this account can be less than appropriate arguments. zero. This private instance variable is set in the constructor. ii. calls the Deposit() method of the base class with the appropriate arguments Methods: (you will send negative of the amount) 1. public CheckingAccount ( double balance =, bool hasoverdraft = 4.
  • 9. public override void PrepareMonthlyReport ( ) -this public method override false ) - This public constructor takes a parameter of type double representing the the method of the base class with the same name. The method does the following: Assignment 4, Winter 2022 Assignment 4, Winter 2022 Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Linq hiding, and replacing members, Serialization, Generics, Linq 5. public new void Deposit( double amount, Person person) -this public VisaAccount class method takes two arguments: a double representing the amount to be deposited and a You will implement the VisaAccount Class in Visual Studio. This is a sub class derived from the person object representing the person do the transaction. This method does the following: Account class and implements ITransaction interface. This class has a single class variable. A a. Calls the Deposit () method of the base class with the appropriate arguments. short description of the class members is given below: b. Calls the OnTransactionoccur () method of the base class with the appropriate arguments. i. The second argument TransactionEventArgs needs the name of the person, the amount and true (success of the operation) 2. public void Withdraw( double amount, Person person) -thispublic method takes two arguments: a double representing the amount to be withdrawn and a person object representing the person do the transaction. The method does the following: a. If this person in not associated with this account, it does the following: i. Calls the OnTransactionOccur () method of the base class with the appropriate arguments. Read the above Deposit() method for more explanation ii. Throws the appropriate Account Exception object b. If this person in not logged in, it does the following: i. Calls the OnTransactionoccur () method of the base class with the appropriate arguments. ii. Throws the appropriate AccountException object. c. If the withdrawal amount is greater than the balance and there is no overdraft facility, it does the following: i. Calls the OnTransaction0ccur () method of the base class with the appropriate arguments. ii. Throws the appropriate AccountException object. d. Otherwise it does the following: i. Calls the OnTransactionoccur () method of the base class with the Fields: appropriate arguments. 1. creditLimit-this is a double representing the maximum balance allowable on this ii. calls the Deposit() method of the base class with the appropriate account. This private instance variable is set in the constructor. arguments (you will send negative of the amount) 2. INTEREST_RATE - this is a class variable of type double representing the annual interest 3. public override void PrepareMonthlyReport () -this public method override rate. All of the objects on this class will have the same value. This class variable is the method of the base
  • 10. class with the same name. The method does the following: initialized to 0.1995 . a. Calculate the service charge by multiplying the number of transactions by the COST_PER_TRANSACTION (how can you find out the number of transactions?) Methods: b. Calculate the interest by multiplying the LowestBalance by the 1. public VisaAccount ( double balance =, double creditlimit =1200 ) INTEREST_RATE and then dividing by 12 - This public constructor takes a parameter of type double representing the starting c. Update the Balance by adding the interest and subtracting the service charge balance of the account and a double representing the credit limit of this account. The d. transactions is re-initialized (use the Clear() method of the list class) constructor does the following: This method does not take any parameters, nor does it display anything a. It invokes the base constructor with the string "VS-" and the appropriate argument. Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Ling hiding, and replacing members, Serialization, Generies, linq [It uses the dictionary ACCOUNT_TYPE and the enum AccountType to obtain the Bank class two letter prefix for this account type] You will implement the Bank Class in Visual Studio. This is a static class where all its members are b. Assigns the argument to the appropriate field also static. [All the members of a static class must also be declared static.] A short description of 6. public void DoPayment(double amount, Person person)-this public the class members is given below: method takes two arguments: a double representing the amount to be deposited and a person object representing the person do the transaction. This method does the following: a. Calls the Deposit () method of the base class with the appropriate arguments. b. Calls the OnTransactionoccur () method of the base class with the appropriate arguments. i. The second argument TransactionEventArgs needs the name of the person, the amount and true (success of the operation). 2. public void DoPurchase( double amount, Person person)-this public method takes two arguments: a double representing the amount to be withdrawn and a person object representing the person do the transaction. The method does the following: a. If this person in not associated with this account, it does the following: i. Calls the OnTransactionOccur() method of the base class with the appropriate arguments. Read the above Deposit() method for more explanation ii. Throws the appropriate AccountException object b. If this person in not logged in, it does the following: i. Calls the OnTransactionoccur() method of the base class with the appropriate arguments. ii. Throws the appropriate AccountException object. c. If the withdrawal amount is greater than the balance and there is no overdraft facility, it does the following: i. Calls the OnTransactionOccur () method of the base class with the appropriate arguments. ii. Throws the appropriate AccountException object. d. Otherwise it does the following: i. Calls the OnTransactionOccur() method of the base class with the appropriate arguments. Fields: ii. calls the Deposit() method of the base class with
  • 11. the appropriate 1. ACCOUNTS - this public readonly class variable is a dictionary of account. It is initialized at arguments (you will send negative of the amount) declaration. 3. public override void PrepareMonthlyReport( ) - this public method override 2. USERS - this public readonly class variable is a dictionary of person. It is initialized at the method of the base class with the same name. The method does the following: declaration. a. Calculate the interest by multiplying the LowestBalance by the InterestRate and then dividing by 12 Methods: b. Update the Balance by subtraction the interest 1. Static Bank( ) -This static constructor contains the following statements to initialize c. Transactions is re-initialized the USERS and ACCOUNTS collections. This method does not take any parameter nor does it display anything Winter 2022 Assignment 4 Winter 2022 Assigniment 4, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading. hiding, and replacing members, Serialization, Generics, Linq hiding, and replacing members, Serialization, Generics, Linq //initialize the USERS collection AddUserToAccount(number, "Vijay"); number = "sV-168897"; AddUserToAccount (number, "patrick"); AdduserToAccount (number, "Hao"); 2. public static void PrintAccounts ( ) -this public static method displays all the accounts in the ACCOUNTS collection 3. public static void PrintPersons ( ) -this public static method displays all the //initialize the AcCouNTS collection persons in the USERS collection AddAccount(new VisaAccount()); AddAccount (new VisaAccount (150,50) ); / /VSS-100e01 4. Public static Person GetPerson( string name) -this public static method takes a string representing the name of a person and returns the matching person object. AddAccount(new SavingAc count (5000) ); AddAccount (new SavingAccount ()); This method does the following: a. Check if the argument is present in the key of the static collection USERS. AddAccount (new CheckingAccount (1580, true)); / CK -100005 b. If the argument is present the value part of this pair is returned. AddAccount(new SavingAccount (1000) ); ; SV-1080e7 c. Else the appropriate AccountException object is thrown This method does not display anything on screen I/ associate users with accounts string number = "Vs-189e0" 5. public static Account GetAccount( string number) - this public static AddUserToAccount (number, "Narendra"); method takes a string representing an account number and returns the matching account. This method does the following: AdduserToAccount(number, "Mehrdad") ; a. Check if the argument is present in the key of the static collection ACCOUNTS. number = "VS-180091"; b. If the argument is present the value part of this pair is returned. AdduserToAccount(number, "Vijay"); AdduserToAccount(number, "Arben"); c. Else the appropriate AccountException object is thrown AdduserToAccount(number, "Patrick"); 6. public static void AddPerson(string name, string sin) -this method takes two strings and does the following: number ="5V100902";
  • 12. AddUserToAccount(number, "Yin"); a. Creates a Person object with the two arguments. AdduserToAccount(number, "Hao"); b. Add the static method LoginHandIer() of the Logger class to the AdduserToAccount(number, "Jake"); Eventhandler field (OnLogin) of the above object. number =5V169993 c. Adds a key-value pair to the USERS collection. The key is the first argument and AddUserToAccount(number, "Mayy"); AdduserToAccount(number, "Nicoletta") the value is the object in Step A respectively. 7. public static void AddAccount(Account account)-this method takes an number = "CK-106064" AdduserToAccount(number, "Mehrdad") account argument and does the following: AddUserToAccount (number, "Arben"); a. Add the static method TransactionHandler() of the Logger class to the AddUserToAccount (number, "Yin"); number = "CK-106005"; b. Adds a key-value pair to the ACCOUNTS collection. The key is the Number AddUserToAccount (number, "Jake"); AddUserToAccount (number, "Nicoletta") 8. public static void AddUserToAccount(string number, string name) - number - -VS-1060e6"; this method takes two string arguments and does the following: AddUser ToAccount (number, "Ilia"); a. Locates the account matching the first argument. Uses-Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Linq Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading. hiding, and replacing members, Serialization, Generics, Linq b. Locates the person matching the second argument. Testing c. Invokes the AddUser() method on the account object and passing the person Use the following code in your test harness. object. Console. WriteLine("InA1I acounts:"); Bank.PrintAccounts(); console. Writeline("inall users:"); Bank.PrintPersons(); Person p9,p1,p2,p3,p4,p5,p6,p7,p8,p9,p1; p= Bank.GetPerson ("Narendra"); p1= Bank.GetPerson ("Ilia"); 22= Bank.GetPerson("Mehrdad"); p3= Bank.GetPerson ("Vijay"); p4= Bank.GetPerson("Arben"); 6= Bank.GetPerson ("Yin"); 7= Bank.GetPerson ("Hao"); p8= Bank.GetPerson ("Jake"); p9= Bank.GetPerson ("Mayy"); p10 = Bank.GetPerson("Nicoletta"); pe. Login("123); p1. login("234"); p2. login("345); p3. Login("456); p10.Login("234"); p8.Login ("901"); I/a visa account VisaAccount a= Bank.GetAccount("VS- 1800) as VisaAccount; a.Pay (15,p); a.Purchase (2,p1); a. Purchase (39,p1); a. Pay (4e,p); Console.Writeline(a); a= Bank. GetAccount("VS-1000e1") as VisaAccount; a. Pay(5,p); a. Purchase (25,p3); a.Purchase (20,p4); a. Purchase(15, p5); //a saving account SavingAccount b = Bank.GetAccount ("SV-10002") as SavingAccount; b. Withdraw (300, p6); b. Withdraw (32,90,p6); b. withdraw (50,p7) : b. Withdraw (111,11,p8); console.WriteLine(b); b = Bank.GetAccount ("SV-100e3") as SavingAccount; b.Deposit (300, p3); //ok even though p3 is not a holder
  • 13. Assignment 4, Winter 2022 Assignment 4, Winter 2022 Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Linq b.Deposit (32.90,p2); b.Deposit (50,p5); b. Withdraw(111.11, p1e); Console.Writeline(b); try //a checking account CheckingAccount C= Bank.GetAccount("CK- 100004") as checkingAccount; catch (AccountException e) {Console.Writeline(e.Message); } c.Deposit (33.33,p7); try c.Deposit (48.44,p7); c. Withdraw (150,p2); {= c.Withdraw (1500,p6); //no overdraft c. Withdraw (200,p4); catch (AccountException e) { Console. Writeline(e.Message); } c.Withdraw (645,p6); Console.Writeline(c); c= Bank.GetAccount ("CK-180005") as checkingAccount; {try{Bank.GetAccount("CK- 109018");//accountdoesnotexist c.Deposit(33.33, p8); c.Deposit (48.44,p7); c. Withdraw (450,p1); c. Withdraw (500,p8); c.Withdraw (645,p1); c.Withdraw (85,p1); Console.Writel ine(c); a = Bank.GetAccount ("VS-1006") as VisaAccount; a.Pay (76,p); a.Purchase (20,p3); a.Purchase (10,p1); a.Purchase (15,p1); b= Bank.GetAccount ("SV-108e7") as SavingAccount; b.Deposit (300, p3); //ok even though p3 is not a holder b.Deposit (32.90, p2); b.Deposit (50,p5); console.Writeline(b); Console. Writeline("InnExceptions:"); //The following will cause exception try { p8.Login("911"); //incorrect password } catch (AccountException e) { Console.writeline(e.Message); } hiding, and replacing members, Serialization, Generics, Linq VS- 100901$25.00withdrawnbyVijayon2021-88-2823:55hiding,andreplacingmembers,Serialization, Generics,Linq Sample output VS-109001 $15, 90 withdrawn by Patrick on 2021-99-93 93:46 Use the following code in your test harness. SV-10002 Yin Logged in, Hao Logged in, Jake Logged in $4,505.99 - transactions (4) SV-100e2 $300.80 withdrawn by Y in on 2821-89-84 20:23 SV-100002 $32.90 withdrawn by Yin on 2021-09-65 17:11 SV-100002 $50,08 withdrawn by Hao on 2021-09-07 68:54 A11 acounts: SV-100803 Mayy Not logged in, Nicoletta Logged in $271.79 - transactions (4) [VS-100000, VS-100000 Narendra Not logged in, Ilia Not logged in, Mehrdad Not SV-100603 $300.80 deposited by Vijay on 2821-69-18 18:14 logged in $. - transactions (B) SV-100003 $32.90 deposited by Mehrdad on 2021-89-12 28:28 [VS-100001, VS-100001 Vijay Not logged in, Arben Not logged in, Patrick Not SV-100003 $50.80 deposited by Patrick on 2021-99-13 66:52 SV-100003 $111.11 withdrawn by Nicoletta on 2021-99-15 6e:51 logged in $150. - transactions () CK-1000e4 Mehrdad Logged in, Arben Logged in, Yin Logged in $728.77 - transactions (6) [SV-1008e2, SV-10002 Yin Not logged in, Hao Not logged in, Jake Not logged in CK-100004 $33.33 deposited by Hao on 2021-89-16 10:4e $5,8. - transactions () CK-10804 $40.44 deposited by Hao on 2821-89-18 93:03 CK- 100004 $150.00 withdrawn by Mehrdad on 2821-09-20 17:27 [SV-100e3, SV-108003 Mayy Not
  • 14. logged in, Nicoletta Not logged in $. - CK-100004 $200.80 withdrawn by Arben on 2021-89-22 19:01 transactions () CK-100004 $645.00 withdrawn by Yin on 2821-09-25 82:44 [CK-100e04, CK-100004 Mehrdad Not logged in, Arben Not logged in, Yin Not logged CK-100004 $350.00 withdrawn by Yin on 2021-09-27 10:29 CK-100005 Jake Logged in, Nicoletta Logged in - $871.23 - transactions (6) CK-108005 $33.33 deposited by Jake on 2021-99-28 86:51 CK- 100005 $48.44 deposited by Hao on 2921992967:34 [CK-16805, CK-180805 Jake Not logged in, Nicoletta Not logged in $1,500.00 - CK-100005 $450.00 withdrawn by Nicoletta on 2021-99-30 96:07 transactions (e) CK-100005 $500.00 withdrawn by Jake on 2021-10-81 13:11 [VS-109006, VS-100006 Ilia Not logged in, Vijay Not logged in $50.00 - CK-108005 $645.00 withdrawn by Nicoletta on 2021-10-02 12:47 CK-108005 $850.00 withdrawn by Nicoletta on 2021-10-83 21:54 VS-100006 Ilia Logged in, Vijay Logged in $785.00 - transactions (4) [SV- 100e7, SV-10807 Patrick Not logged in, Hao Not logged in $1,0. - VS-10006 $700.00 deposited by Narendra on 2021-10-05 15:16 VS-100006 $20.00 withdrawn by Vijay on 221100605:47 VS- 100006 $15.90 withdrawn by Ilia on 2021-10-89 98:31 SV-1000e7 Patrick Logged in, Hao Logged in $1,271.79 - transactions (4) A11 Users: SV-100007 $300.00 deposited by Vijay on 221110 of:31 [Narendra, Narendra Not logged in] SV-100007 $32.90 deposited by Mehrdad on 2021-10-11 13:55 [Ilia, Ilia Not logged in] SV-100007 $50.00 deposited by Patrick on 2021-10- 12 14:84 [Mehrdad, Mehrdad Not logged in] SV-100007 $111.11 withdrawn by Hao on 2021-10-13 11:58 [Vijay, Vijay Not logged in] [Arben, Arben Not logged in] [Patrick, Patrick Not logged in] Exceptions: PASSWORD INCORRECT [Yin, Yin Not logged in] USER NOT_LOGGED IN [Jake, Jake Not logged in] NAME NOT ASSOCIATED WITH ACCOUNT NAME NOT ASSOCIATED_WITH_ACCOUNT [Mayy, Mayy Not logged in] NAME_NOT_ASSOCIATED_WITH_ACCOUNT VS-1088e Marendra Logged in, Ilia Logged in, Mehrdad Logged in $1,621.00 - ACCOUNT DOES NOT EXIST USER_DOES_NOT_EXIST transactions (6) VS-10080 $1,508, deposited by Narendra on 2021-08-18 05:10 VS 100000$200.60 withdrawn by Ilia on 2021-08-19 69:11 VS 100080$25.00 withdrawn by Mehrdad on 2021-08-20 01:39 VS 106000$15.00 withdrawn by Narendra on 2021-68-22 05:21 Al1 transactions VS-1000e $1,500,00 deposited by Narendra on 2021-88-18 85:10 VS 1000$200.00 withdrawn by Ilia on 2021-08-19 09:11 VS 108000$39.00 withdrawn by Ilia on 2021-08-24 18:17 VS-10600e $460.00 deposited by Narendra on 2021-08-25 21:58 VS- 100000 $25.00 withdrawn by Mehrdad on 2021-08-20 01:39 VS-108801 Vijay Logged in, Arben Logged in, Patrick Logged in $590.80 - transactions VS-100000 $15.00 withdrawn by Narendra on 2021-08-22 05:21 VS-10000e $39.00 withdrawn by Ilia on 2021-08-24 18:17 (4) V5-100801 $560.80 deposited by Narendra on 2021-08-27 60:39 VS-1000e0 $400.00 deposited by Narendra on 2021-08-25 21:58
  • 15. Assignment 4, Winter 2022 Assignment 4, Winter 2022 Uses-Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Linq hiding, and replacing members, Serialization, Generics, Ling VS- 100e01 $500.00 deposited by Narendra on 2021-08-27 80:39 VS-1080e1 $25.8 withdrawn by Vijay on 2821-88-28 23:55 VS-100001 Vijay Not logged in, Arben Logged in, Patrick Logged in $619.92 transactions () SV-108002 $300.00 withdrawn by Y in on 2021-89-84 20:23 Before PrepareMonthlyReport() SV-100e02 $32.98 withdrawn by Yin on 2021-09-05 17:11 SV-180002 Yin Logged in, Hao Logged in, Jake Not logged in $4,505.99 - transactions SV-1000e2 $111.11 withdrawn by Jake on 2021-09-08 16:16 (4) SV- 183$30.0 deposited by Vijay on 2021- 9118:14 SV-108002 $32.90 withdrawn by Y in on 2021-09-05 17:11 SV-10008 $50.08 withdrawn by Hao on 2021-09-07 68:54 SV-108003 $50.08 deposited by Patrick on $111.11 withdrawn by Nicoletta on 2021-09-15 8:51 CK-108084 $33.33 deposited by Hao on 2021-09-16 10:40 After PrepareMonthlyReport () CK-100e4 $4.44 deposited by Hao on 2021-09-18 03;03 CK-108084 $150.00 withdrawn by Mehrdad on 2021-09-20 17:27 SV-108002 Yin Logged in, Hao Logged in, Jake Not logged in $4,573.38 - transactions CK-1800e4 $200.80 withdrawn by Arben on 2021-09-22 19:01 (b) CK-1 10004$645.00 withdrawn by Yin on 2821- 89252:44 Before PrepareMonthlyReport() CK-180005 $4.44 deposited by Hao on 2021- 892907:34 SV-100e3 Mayy Not logged in, Nicoletta Logged in $271.79 - transactions (4) CK-108085 $45.80 withdrawn by Nicoletta on 2021-09-30 86:07 SV-100003 $300.00 deposited by Vijay on 2021- 69-18 18:14 CK-188005 $500.80 withdrawn by Jake on 2821-10-01 13:11 CK-1880e5 $645.80 withdrawn by Nicoletta on 282118212;475S180003 $111, 11 withdrawn by Nicoletta on 2021-89-15 80:51 CK-1080es $850.80 withdrawn by Nicoletta on 2021-10-03 21:54 VS-188006 $700.80 deposited by Narendra on 2821-18-05 15:16 After PrepareMonthlyReport() VS- 1886$28.88 withdrawn by Vijay on 2021-10-06 85:47 SV-100003 Mayy Not logged in, Nicoletta Logged in $271.59 - transactions ( ) VS-180886 $10.8 withdrawn by Ilia on 2021-18-87 19:54 VS-18808 $15.88 withdrawn by Ilia on 2821-10-89 88:31 VS-1080e6 $15.8 withdrawn by Ilia on 2021-10-89 88:31 Before PreparemonthlyReport() SV-1080e7 $32.90 deposited by Mehrdad on 2021-10-11 13:55 SV-1088e7 $5.88 deposited by Patrick on 2021-10- 12 14:84 SV-18807 $111.11 withdrawn by Hao on 2821-10-13 11:58 CK-1808e4 Mehrdad Logged in, Arben Logged in, Yin Logged in $728.77 - transactions (6) CK-1000e4 $33.33 deposited by Hao on 2021-09-16 10:48 Before PrepareMonthlyReport () CK-100004 $46.44 deposited by Hao on 2021-09-18 03:03 VS-188e Narendra Logged in, Ilia Logged in, Mehrdad Logged in $1,621.0 CK-100804 $200.00 withdrawn by Arben on 2021-09-22 19:01 transactions (6) VS- 1800$200.80 withdrawn by Ilia on 2821-88-19 89:11 After PrepareMonthlyReport() VS- 108000$15.80 withdrawn by Narendra on 2821- 882205:21 VS- 18080$39.8 withdrawn by Ilia
  • 16. on 2821-88-24 18:17 CK-108004 Mehrdad Logged in, Arben Logged in, Yin Logged in $732.11 - transactions After PrepareMonthlyReport() Before Preparemonthlyreport() VS-1888e Narendra Logged in, Ilia Logged in, Mehrdad Logged in $1,621.80 transactions () CK-1800e5 Jake Not logged in, Nicoletta Logged in - $871.23 - transactions (6) Before PrepareMonthlyReport () CK- 1080005 $50.00 withdrawn by Jake on 2021-10-01 13:11 vS-1001 Vijay Not logged in, Arben Logged in, Patrick Logged in $590.8. transactions (4) CK-1080es $645.00 withdrawn by Nicoletta on 2021-10-82 12:47 VS-188001 $580.80 deposited by Narendra on 2021-08-27 80:39CK105$850.00 withdrawn by Nicoletta on 2021-10-83 21:54 VS-180801 $25.00 withdrawn by vijay on 2821-88-28 23:55 After PrepareMonthlyReport ( VS-188801 $2.08 withdrawn by Arben on 2821-89-81 89:51 VS-100001 $15.88 withdrawn by Patrick on 2021-09- 83 83:46 CK-1000e5 Jake Not logged in, Nicoletta Logged in - $875.89 - transactions (0) After PrepareMonthlyReport() Before PrepareMonthlyReport() Assignment 4, Winter 2022 Assignment 4, ders, Collections Operator overloading, Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Ling hiding, and replacing members, Serialization, Generics, Linq VS-100006 Ilia Logged in, Vijay Not logged in $705.00 - transactions (4) 21 Mehrdad deposit $150.08 successfully on 2821-89-19 11:17 VS-10806 $70.0 deposited by Narendra on 2021-10-05 15:16 VS- 180006$20.00 withdrawn by Vijay on 2021- 10-06 05:47 23 Yin deposit $645.80 successfully on 2821-89-23 21:42 VS- 180006$18.80 withdrawn by Ilia on 2821-10-87 19:54 24 Yin deposit $350.80 successfully on 2021-09-26 84:27 25 Jake deposit $33.33 successfully on 2821-09-27 22:25 After PrepareMonthlyReport() 27 Nicoletta deposit $450.80 successfully on 2021-09-30 84:37 VS-108006 Ilia Logged in, Vijay Not logged in $714.98 - transactions ( ) 28 Jake deposit $500.80 successfully on 2021-69-30 17:15 29 Nicoletta deposit $645.00 successfully on 2021-10-02 88:42 30 Nicoletta deposit $850.00 successfully on 2821-18-02 22:48 Before PrepareMonthlyReport() 31 Narendra deposit $78.8 successfully on 2021-10-84 20:47 SV-10807 Patrick Logged in, Hao Logged in $1,271.79 - transactions (4) 32Vijay deposit $2.00 successfully on 2021-10-85 21:84 SV-188007 $32.90 deposited by Mehrdad on 2021-10-11 13:55 33 Ilia deposit $1.00 successfully on 2021-10-86 23:51 34 Ilia deposit $15.0 successfully on 2021-10-08 06:25 SV-10007 $50.00 deposited by Patrick on 2021-10-12 14:04 36 Mehrdad deposit $32.90 successfully on 2021-10-11 05:38 37 Patrick deposit $50.80 successfully on 2021-10-12 96:37 After PrepareMonthlyReport() 38 Hao deposit $111.11 successfully on 2021-10-13 10:12 SV-108e7 Patrick Logged in, Hao Logged in $1,286.59 - transaction5 ( ) 39 Vijay deposit $12.50 unsuccessfully on 2821-10-15 18:24 40 Narendra deposit $12.50 unsuccessfully on 2021-10-16 14:19 41 Arben deposit $5,825.08 unsuccessfully on 2821-10-17 13:56 42 Yin deposit $1,58.80 unsuccessfully on 2021-18-18
  • 17. 85:02 Login events as of 2021-10-18 05:02 1 Narendra logged in successfully on 2021-88-89 21:24 2 Ilia logged in successfully on 2021-08-11 88:02 3 Mehrdad logged in successfully on 2021-08-12 89:15 4 Vijay logged in successfully on 2021- 88135:23 5 Arben logged in successfully on 2021-88-13 15:16 6 Patrick logged in successfully on 2021- 881489:14 7 Yin logged in successfully on 2021-08-14 22:32 8 Hao logged in successfully on 2021-88-15 12:4e 9 Nicoletta logged in successfully on 2021-08-15 20:23 18 Jake logged in successfully on 2021- 88-16 16:08 11 Jake logged in unsuccessfully on 2021-10-14 81:59 Transaction events as of 2021-10-18 65:02 1 Narendra deposit $1,500.00 successfully on 2021-08-17 07:05 2 Ilia deposit $20.00 successfully on 2021-08-18 19:58 3 Mehrdad deposit $25.00 successfully on 2021-08-19 12:26 4 Narendra deposit $15.00 successfully on 2021-08-21 05:58 5 Ilia deposit $39.60 successfully on 2021-08-23 14:17 6 Narendra deposit $400.00 successfully on 2021-08-25 06:04 7 Narendra deposit $500.00 successfully on 2021-08-26 83:11 8 Vijay deposit $25.80 successfully on 2021-08-27 16:59 9 Arben deposit $20.00 successfully on 2021-08-30 85:42 16 Patrick deposit $15.00 successfully on 2021-09-01 22:08 11 Yin deposit $300.00 successfully on 2021-09-04 13:01 12 Yin deposit $32.90 successfully on 2021-09-05 11:14 13 Hao deposit $50.00 successfully on 2021-09-06 67:43 14 Jake deposit $111.11 successfully on 2021-09-07 12:20 15 Vijay deposit $30.60 successfully on 2021-09-09 14:05 16 Mehrdad deposit $32.90 successfully on 2021-09-11 16:50 18 Nicoletta deposit $111.11 successfully on 2021-09-13 23:30 19 Hao deposit $33.33 successfully on 2021-09-16 98:38 20 Hao deposit $4.44 successfully on 2021-09-17 01:40 Assignment 4, Winter 2022 Uses - Inheritance, Interfaces, Exceptions, EventHandlers, Collections Operator overloading, hiding, and replacing members, Serialization, Generics, Linq Appendix Copy the following statements to your Utils class //this class depends of the implementation of the following types: //DayTime struct and AccountType enum public static class Utils { static DayTime time = new DayTime (1048_00_00); static Random random = new Random(); public static DayTime Time { get time += random.Next (18); } public static DayTime Now { get time +=; public readonly static Dictionary ACCOUNT TYPES = new Dictionary f { AccountType.checking, "cK" }, { AccountType. Saving , "sv" }, {AccountType. Visa, vis } };