https://github.com/truecodersio/bankencapsulation
.NET 6.0 template project for the Encapsulation exercise at TrueCoders
https://github.com/truecodersio/bankencapsulation
Last synced: about 1 year ago
JSON representation
.NET 6.0 template project for the Encapsulation exercise at TrueCoders
- Host: GitHub
- URL: https://github.com/truecodersio/bankencapsulation
- Owner: truecodersio
- Created: 2022-09-07T01:54:53.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-28T18:08:52.000Z (over 1 year ago)
- Last Synced: 2025-04-06T21:14:58.871Z (over 1 year ago)
- Language: C#
- Size: 144 KB
- Stars: 0
- Watchers: 2
- Forks: 391
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Exercise 1:
Create a new public class named BankAccount
In your BankAccount class, create the following:
+ A private field of type double named balance with a value of 0
+ Define a method named Deposit that will accept a double and store that value in the balance field
+ Define a method named GetBalance that will return the amount stored in the balance field
In the main method of your application, create a new instance of the BankAccount class. Allow the user of the application to Deposit money and retrieve their balance through the console.
Once finished save, commit, and push back to Github