Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

This is C# programming with only microsoft docs as a reference. I'm lost and don't know where else to turn. Help!! How do I set

image text in transcribed

This is C# programming with only microsoft docs as a reference. I'm lost and don't know where else to turn. Help!! How do I set up this BankAccount?

ad and Sealed Censes and Classes and objects - Introducto x 11. How to program in C# * Get Homework Help wa describes the type of transaction. Set the class properties in the constructor BankAccount (Read carefully as the specification has changed from Wook 1) Define Bank Account as a public abstract class. Define a public property called AllTransactions that gets the bank account Transactions. (List Transaction>). public List Transactions All Transactions { get; } .new ListTransaction() Define a public property named Balance that gets the current balance. (decimal). The property will return the balance by summing all the transactions for the bank account (AllTransactions). public decimal Balance pet/rYour implementation goes in here) Define a public property named AccountNumber that gets and sets the account number. (string) Define an empty default constructor Define an overloaded constructor with a parameter of type string to set the account number and a parameter of type decimal to set the balance. The contents of the overloaded constructor are below. This will serve as the base constructor for inheriting classes. Account Number - account Number; Deposit(balance, DateTime.Now, "Starting balance"); Define a void method named Deposit. It should have a parameter of the type decimal which will be the amount of the deposit, a parameter of type Date Time to provide a timestamp of the deposit, and parameter of type string to describe the deposit. You will be creating a new transaction within this method and adding it to the list of transactions. Define an abstract method named Withdraw. It should have a parameter of the type decimal which will be the amount of the withdrawal, a parameter of type Date Time to provide a timestamp of the withdrawal, and parameter of type string to describe the withdrawal. The implementation of the method will be done by the inheriting classes Savings Account (Road carefully as the specification has changed from Week 1) Define a public Savings Account class. The SavingsAccount class will inherit from the Bank Account class . Declare a private readonly field to store the rate for the withdrawal fee (decimal). The fee is 10% (10) of the transaction amount. Initialize the withdrawal fee to 10m at declaration Define a default constructor with an empty body. Define an overloaded constructor with a parameter of type string to set the account number and a parameter of type decimal to set the balance. The values will be initialized by the base constructor. Dadion method thi n g the beach metodidefined in the handschoudha ad and Sealed Censes and Classes and objects - Introducto x 11. How to program in C# * Get Homework Help wa describes the type of transaction. Set the class properties in the constructor BankAccount (Read carefully as the specification has changed from Wook 1) Define Bank Account as a public abstract class. Define a public property called AllTransactions that gets the bank account Transactions. (List Transaction>). public List Transactions All Transactions { get; } .new ListTransaction() Define a public property named Balance that gets the current balance. (decimal). The property will return the balance by summing all the transactions for the bank account (AllTransactions). public decimal Balance pet/rYour implementation goes in here) Define a public property named AccountNumber that gets and sets the account number. (string) Define an empty default constructor Define an overloaded constructor with a parameter of type string to set the account number and a parameter of type decimal to set the balance. The contents of the overloaded constructor are below. This will serve as the base constructor for inheriting classes. Account Number - account Number; Deposit(balance, DateTime.Now, "Starting balance"); Define a void method named Deposit. It should have a parameter of the type decimal which will be the amount of the deposit, a parameter of type Date Time to provide a timestamp of the deposit, and parameter of type string to describe the deposit. You will be creating a new transaction within this method and adding it to the list of transactions. Define an abstract method named Withdraw. It should have a parameter of the type decimal which will be the amount of the withdrawal, a parameter of type Date Time to provide a timestamp of the withdrawal, and parameter of type string to describe the withdrawal. The implementation of the method will be done by the inheriting classes Savings Account (Road carefully as the specification has changed from Week 1) Define a public Savings Account class. The SavingsAccount class will inherit from the Bank Account class . Declare a private readonly field to store the rate for the withdrawal fee (decimal). The fee is 10% (10) of the transaction amount. Initialize the withdrawal fee to 10m at declaration Define a default constructor with an empty body. Define an overloaded constructor with a parameter of type string to set the account number and a parameter of type decimal to set the balance. The values will be initialized by the base constructor. Dadion method thi n g the beach metodidefined in the handschoudha

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions