CMPUT174 Lecture Notes - Lecture 4: Exception Handling, New Balance

48 views3 pages
ceruleanzebra152 and 30 others unlocked
CMPUT174 Full Course Notes
25
CMPUT174 Full Course Notes
Verified Note
25 documents

Document Summary

The solutions to these exercises have to be shown to your ta in your assigned lab before the end of your lab time. To get full marks for this lab, you must complete exercise 1 and either exercise 2 or 3 (choose one). Write a program that reads in a list of accounts from a file, and then allows the user to enter transactions for each account. The file accounts. txt contains a list of accounts with initial balances. As the program runs, it should ask the user for the name of an account, and the amount of money to deposit or withdraw from the account. After each transaction, the program should print the amount remaining in the account. If the accounts. txt file is missing, the program should exit with an error message. If any account has a non-float value for the balance, the program should display an error and not add that account.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions