{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Principles of Macroeconomics (9th Edition)

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
AHLIA UNIVERSITY College of Information Technology Second Semester 2009/2010 ITCS 222: Visual Programming Assignment 1 Due Thursday, 8 th of April, 2010 Name_________________________ Student Number_______________ Section number_________________ Q1. ( Account Class) Create a class called Account that a bank might use to represent customers’ bank accounts. Your class should include one instance variable of type Integer to represent the account balance (in whole dollars). [Note: In subsequent chapters, we will use type Decimal values to represent dollar amounts with cents.] Your class should provide a constructor that receives an initial balance and uses it to initialize the instance variable. The constructor should validate the initial balance to ensure that it is greater than or equal to 0. The class should provide two methods and a property. Method Credit should add an amount to the current balance. Method Debit should withdraw money from the Account and should ensure that the debit amount does not exceed the Account ’s balance. If it does, the balance should be left
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 2

file - AHLIA UNIVERSITY College of Information Technology...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online