Skip to content

truecodersio/BankEncapsulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages