예제 #1
0
def main():

	#scenario 1 test
	person1 = Account(0.35,1000)
	person1.withdraw(500,1)
	person1.calc_prin_bal_day(person1.bal_sheet,person1.dayPrin)
	interest=person1.apr_calc(person1.bal_sheet,person1.dayPrin)
	tot_payoff=person1.get_final_prin_bal(person1.dayPrin)+interest
	print "Scenario 1 Test:"
	print "Interest owed is $%05.2f"%(interest)
	print "Total Payoff amount is $%06.2f"%(tot_payoff)

	#scenario 2 test
	person2 = Account("35%",1000)
	person2.withdraw(500,1)
	person2.pay(200,15)
	person2.withdraw(100,25)
	
	person2.calc_prin_bal_day(person2.bal_sheet,person2.dayPrin)
	interest2=person2.apr_calc(person2.bal_sheet,person2.dayPrin)
	tot_payoff2=person2.get_final_prin_bal(person2.dayPrin)+interest2

	print "\nSecenario 2 Test:"
	print "Interest owed is $%05.2f"%(interest2)
	print "Total Payoff amount is $%06.2f"%(tot_payoff2)