Skip to content

Instantly share code, notes, and snippets.

Created January 25, 2018 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/8aec3bc4a538381ff028b18bb7274435 to your computer and use it in GitHub Desktop.
Save anonymous/8aec3bc4a538381ff028b18bb7274435 to your computer and use it in GitHub Desktop.
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.19+commit.c4cbbb05.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Bank {
uint private value;
function Bank(uint amount) public{
value = amount;
}
function deposite(uint amount) public{
value += amount;
}
function withDraw(uint amount) public{
value -= amount;
}
function balance() public view returns(uint){
return value;
}
}
contract myFirstContract is Bank(10){
string private name ;
uint private age ;
function setName(string newName) public{
name = newName;
}
function getName() public view returns(string){
return name;
}
function setAge(uint newAage) public{
age = newAage;
}
function getAge() public view returns(uint){
return age;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment