Skip to content
 
 

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

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

About

.NET 6.0 template project for the Encapsulation exercise at TrueCoders

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages