pragma solidity ^0.5.11;
contract ArticleTwo {
// President and Vice President
struct President {
string name;
uint256 term;
}
struct VicePresident {
string name;
uint256 term;
}
President p;
VicePresident vp;
// Election process
function electPresident(string memory _name) public {
p.name = _name;
p.term = 4;
}
function electVicePresident(string memory _name) public {
vp.name = _name;
vp.term = 4;
}
// Constructor
constructor() public {
p.name = "";
vp.name = "";
}
}
pragma solidity ^0.5.11;
contract Congress {
// Legislative powers
enum LegislativePowers {
Taxation, BorrowingMoney, RegulationCommerce, Naturalization, Bankruptcy,
CoinageRegulation, WeightsMeasures, PiraciesFelonies, WarPeace, ArmyNavy,
PostOffice, Patents, Copyrights
}
// Senate and House of Representatives
struct Senate {
uint8 seats;
uint8 term;
}
struct HouseOfReps {
uint8 seats;
uint8 term;
}
Senate s;
HouseOfReps h;
// Constructor
constructor(uint8 seats_senate, uint8 term_senate, uint8 seats_house, uint8 term_house) public {
s.term = term_senate;
h.seats = seats_house;
h.term = term_house;
}
}