19.12.2012 Views

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FIGURE 3-9 Sample Run for <strong>Programming</strong> Project 4<br />

5. Write a program to generate a Business Travel Expense attachment for an<br />

income tax return. The program should request as input the name of the organization<br />

visited, the date <strong>and</strong> location of the visit, <strong>and</strong> the expenses for meals<br />

<strong>and</strong> entertainment, airplane fare, lodging, <strong>and</strong> taxi fares. (Only 50% of the<br />

expenses for meals <strong>and</strong> entertainment are deductible.) A possible form layout<br />

<strong>and</strong> run are shown in Figures 3.10 <strong>and</strong> 3.11, respectively. Sub procedures<br />

should be used for the input <strong>and</strong> output.<br />

FIGURE 3-10 Form with Sample Data for <strong>Programming</strong> Project 5<br />

Business Travel Expense<br />

Trip to attend meeting of<br />

Association for Computing Machinery<br />

February 25–28 in Atlanta<br />

Meals <strong>and</strong> entertainment $190.10<br />

Airplane fare $210.15<br />

Lodging $475.35<br />

Taxi fares $35.00<br />

Total other than Meals <strong>and</strong> Entertainment: $720.50<br />

50% of Meals <strong>and</strong> Entertainment: $95.05<br />

FIGURE 3-11 Output on Printer for Sample Run of <strong>Programming</strong> Project 5<br />

<strong>Programming</strong> Projects 99

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!