SlideShare a Scribd company logo
In Visual Studios C# console app using multiple class files create a checking account.
Objectives:
- Create an inheritance hierarchy that a bank might use to represent customers' bank accounts;
deposit, withdraw.
- Saving accounts earn money, checking accounts charge money for use.
- Validate the data coming in and throw exceptions if invalid.
Account class
- private decimal balance
+ public Account (decimal balance)
+ public Credit (decimal deposit)
+ public Debit (decimal withdraw)
+ public getBalance()
SavingsAccount extends Account
- private decimal interestRate
+ public SavingsAccount (decimal balance, decimal interestRate)
+ public decimal CalculateInterest()
CheckingAccount extends Account
- private decimal transactionFee
+ public CheckingAccount (decimal balance, decimal transactionFee)
* public Debit()
* public Credit()
Account class
- private decimal balance
+ public Account (decimal balance)
+ public Credit (decimal deposit)
+ public Debit (decimal withdraw)
+ public getBalance()
SavingsAccount extends Account
- private decimal interestRate
+ public SavingsAccount (decimal balance, decimal interestRate)
+ public decimal CalculateInterest()
CheckingAccount extends Account
- private decimal transactionFee
+ public CheckingAccount (decimal balance, decimal transactionFee)
* public Debit()
* public Credit()

More Related Content

PDF
Improving application design with a rich domain model (springone 2007)
PPTX
Introduction to Domain driven design (LaravelBA #5)
PDF
Introduction to-ddd
PDF
Inheritance
DOCX
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
PDF
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
PPTX
Dependency injection - the right way
PDF
Consider this C++ BankAccount class with the following public member.pdf
Improving application design with a rich domain model (springone 2007)
Introduction to Domain driven design (LaravelBA #5)
Introduction to-ddd
Inheritance
CSC139 Chapter 9 Lab Assignments (1) Classes and Obj.docx
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Dependency injection - the right way
Consider this C++ BankAccount class with the following public member.pdf

Similar to In Visual Studios C# console app using multiple class files create a.pdf (20)

DOCX
Porfolio of Setfocus work
PPT
A Unified View of Modeling and Programming
PDF
FOIAfest 2016 Session: Data crunchers, this session is for you
DOCX
Write a banking program that simulates the operation of your local ba.docx
PDF
C++ Bank Account Error Fix, full code. I am using Dev-C++ to Compile.pdf
DOC
Vinothkanna1
PPTX
Introduction to OO, Java and Eclipse/WebSphere
PPTX
Object Oriented Programming
PDF
Please distinguish between the .h and .cpp file, create a fully work.pdf
PPTX
Lecture20-Object-Based-Programming-Nov18-2018.pptx
PDF
Kodas ir specifikacija: du zuikiai vienu šūviu
PDF
B2C-Commerce-Developer Dumps
PPT
SetFocus SQL Portfolio
PPT
SQL Server 2008 Portfolio
PDF
Building Rich Domain Models
PDF
T4
PDF
Google Analytics as Database of Record
PPTX
Marcus Matthews
PPTX
Super spike
PPTX
PowerBI Embedded in D365 Finance and Operations
Porfolio of Setfocus work
A Unified View of Modeling and Programming
FOIAfest 2016 Session: Data crunchers, this session is for you
Write a banking program that simulates the operation of your local ba.docx
C++ Bank Account Error Fix, full code. I am using Dev-C++ to Compile.pdf
Vinothkanna1
Introduction to OO, Java and Eclipse/WebSphere
Object Oriented Programming
Please distinguish between the .h and .cpp file, create a fully work.pdf
Lecture20-Object-Based-Programming-Nov18-2018.pptx
Kodas ir specifikacija: du zuikiai vienu šūviu
B2C-Commerce-Developer Dumps
SetFocus SQL Portfolio
SQL Server 2008 Portfolio
Building Rich Domain Models
T4
Google Analytics as Database of Record
Marcus Matthews
Super spike
PowerBI Embedded in D365 Finance and Operations
Ad

More from sanjeevbansal1970 (20)

PDF
In the context of fraud explain the differences between (1) incentiv.pdf
PDF
In the article liars dont qualify by Junius Edwards, What does the .pdf
PDF
In PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdf
PDF
In the early 1970s, the US economy experienced a strong increase in.pdf
PDF
In the context of crystallization of monazite in a silicate melt, La.pdf
PDF
in the article liars dont qualify, y Junius Edwards, What does the .pdf
PDF
In which of the following ways can you not use a subquery in a SELEC.pdf
PDF
In the Government of Canada, individuals within departments to whom .pdf
PDF
In Xcode, Using decomposition, type the code that will most efficien.pdf
PDF
In the article liars dont qualify by Junius Edwards, What is the pu.pdf
PDF
John y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdf
PDF
John is a minor who lives with his mother and stepfather and not his.pdf
PDF
John and Sara are married and live in AZ. They do not have a prenup.pdf
PDF
Joel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdf
PDF
Jin has configured File History on his Windows 10 computer using an .pdf
PDF
JJ firm has a return on equity of 15 percent, a return on assets of 10.pdf
PDF
Jim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdf
PDF
Jean has her first child at age 14. By the time she is 30, she has f.pdf
PDF
JavaScriptIn this project you will create an interactive map for a.pdf
PDF
Java Programming In this programming assignment, you need to impl.pdf
In the context of fraud explain the differences between (1) incentiv.pdf
In the article liars dont qualify by Junius Edwards, What does the .pdf
In PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdf
In the early 1970s, the US economy experienced a strong increase in.pdf
In the context of crystallization of monazite in a silicate melt, La.pdf
in the article liars dont qualify, y Junius Edwards, What does the .pdf
In which of the following ways can you not use a subquery in a SELEC.pdf
In the Government of Canada, individuals within departments to whom .pdf
In Xcode, Using decomposition, type the code that will most efficien.pdf
In the article liars dont qualify by Junius Edwards, What is the pu.pdf
John y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdf
John is a minor who lives with his mother and stepfather and not his.pdf
John and Sara are married and live in AZ. They do not have a prenup.pdf
Joel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdf
Jin has configured File History on his Windows 10 computer using an .pdf
JJ firm has a return on equity of 15 percent, a return on assets of 10.pdf
Jim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdf
Jean has her first child at age 14. By the time she is 30, she has f.pdf
JavaScriptIn this project you will create an interactive map for a.pdf
Java Programming In this programming assignment, you need to impl.pdf
Ad

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
GDM (1) (1).pptx small presentation for students
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Institutional Correction lecture only . . .
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Classroom Observation Tools for Teachers
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Complications of Minimal Access Surgery at WLH
Abdominal Access Techniques with Prof. Dr. R K Mishra
Microbial disease of the cardiovascular and lymphatic systems
Chinmaya Tiranga quiz Grand Finale.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
GDM (1) (1).pptx small presentation for students
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Institutional Correction lecture only . . .
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Cell Structure & Organelles in detailed.
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
A systematic review of self-coping strategies used by university students to ...
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Module 4: Burden of Disease Tutorial Slides S2 2025
Classroom Observation Tools for Teachers
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf

In Visual Studios C# console app using multiple class files create a.pdf

  • 1. In Visual Studios C# console app using multiple class files create a checking account. Objectives: - Create an inheritance hierarchy that a bank might use to represent customers' bank accounts; deposit, withdraw. - Saving accounts earn money, checking accounts charge money for use. - Validate the data coming in and throw exceptions if invalid. Account class - private decimal balance + public Account (decimal balance) + public Credit (decimal deposit) + public Debit (decimal withdraw) + public getBalance() SavingsAccount extends Account - private decimal interestRate + public SavingsAccount (decimal balance, decimal interestRate) + public decimal CalculateInterest() CheckingAccount extends Account - private decimal transactionFee + public CheckingAccount (decimal balance, decimal transactionFee) * public Debit() * public Credit() Account class - private decimal balance + public Account (decimal balance) + public Credit (decimal deposit) + public Debit (decimal withdraw) + public getBalance() SavingsAccount extends Account - private decimal interestRate + public SavingsAccount (decimal balance, decimal interestRate) + public decimal CalculateInterest() CheckingAccount extends Account - private decimal transactionFee + public CheckingAccount (decimal balance, decimal transactionFee)
  • 2. * public Debit() * public Credit()