Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / COSC 1336 — Fundamentals of Programming I Exam 2 Project Write a program that will manage the bank statement of AllyBaba

COSC 1336 — Fundamentals of Programming I Exam 2 Project Write a program that will manage the bank statement of AllyBaba

Computer Science

COSC 1336 — Fundamentals of Programming I

Exam 2 Project

Write a program that will manage the bank statement of AllyBaba.. Make sure that we follow all the programming styles (20% of the grade) that we have learned in class:

  • proper variable names
  • use of functions
  • readability
  • comments/documentation

Project Description

Write a program to help you balance your checkbook at the end of the month. The program should have the user enter the initial balance followed by a series of transactions. For each transaction, first have the user enter a transaction type. The valid transaction types are:

  • C- Process a check.
  • D- Process a deposit.
  • E- Perform end of month processing and exit the program.

For checks and deposits, the user should be prompted to enter the transaction amount.

Service Charges

  • There is a $0.25 service charge for each check written. Keep a running total of the service charges.
  • Service charges are not deducted from the account balance until the end of the month.

Output

After each transaction, print

  • the command data (to confirm the transaction)
  • the resulting account balances
  • the total service charges accrued so far

At the end of the month, deduct the service charges and print the final balance. Your program output should look something like this example (user input 1s shown in bold).

Input validation

  • If the transaction type is invalid, print an informative error message. Ignore the current transaction and have the user enter the next transaction.
  • The transaction amount should be a positive number (larger than zero). If it is not, print an informative error message. Ignore the current transaction and have the user enter the next transaction.

Other requirements

  • Do not use global variables in any assignment. A global variable is a variable that is declared outside any function.
  • All dollar amounts should be printed with 2 decimal places.

SAMPLE RUN (User entry is in RED)

User’s Entry

AllyBaba Bank Monthly Statement

Enter the beginning balance: 900

Select Transaction Type:

C - Process a check

D - Process a deposit

E - Exit

Enter transaction type: C

Enter Check amount: 50.25

Processing Check for $50.25

Processed Check for $50.25

Current Balance: $849.75

Service charge: $.25 for writing a check

Accrued service charges: $.25

Select Transaction Type:

C - Process a check

D - Process a deposit

E — Exit

Enter transaction type: C

Enter Check amount: 250

Processing Check for $250.00

Processed Check for $250.00

Current Balance: $599.75

Service charge: $.25 for writing a check

Accrued service charges: $.50

Select Transaction Type:

C - Process a check

D - Process a deposit

E — Exit

Enter transaction type: D

Enter transaction amount: 200

Processing Deposit of $200.00

Processed Deposit of $200.00

Current Balance: $799.75

Accrued service charges: $.50

Select Transaction Type:

C - Process a check

D - Process a deposit

E — Exit

Enter transaction type: E

Processing end of month

End of Month Summary

Current Balance: $799.75

Accrued service charges: $.50

End of month balance: $799.25

Date Stamp:

Make sure your name is on all pages turned in. TAKE YOUR TIME and READ QUESTIONS CAREFULLY! I give partial credit, so if you don't know the complete answer to a question, write down the parts that you do know. Unless a question asks you to write a complete program, you only need to write the statements required to perform the requested task. TOTAL POINTS = 60.

1) Write a function (readFile) which will read integers from a file (numbers.txt).  The function will

    1. calculates the average of all the numbers stored in the file. 
    2. returns the average.

2) Write a function (getCount) that will allow the users to enter integer numbers.  The program will terminate when -999 is entered. 

The program

  • Returns the count of numbers that are divisible by 10.

3) What value is printed by the call find Value(10, 3, 7) for the function calculate below?

def findValue (a, b, c):

if (a == c % b):

return a // c

elif (a – c  != 3):

if (b >= c):

     return b % c

else:

return  c * a

      return a * b % c

 

print(findValue(10, 3, 7))

 

What value it will print:  _______________________________________

 

  1. The date June 10, 1960, is special because when it is written numerically, the month time the day equals the year:

    6/10/60 --> 6*10 = 60

    Design a function (doCalculation) that
    1. asks the user to enter a month (in numeric form), a day, and a two-digit year in three separate inputs.
    2.  The program should determine whether the month times the day equals the year.
    3. If so, it should print, "This date is magic!" Otherwise, it should print, "This date is not magi"

5. (11 points) Write a function that displays the Fahrenheit equivalents of Celsius temperatures.  The function will have the Celsius as the parameter. 

The formula for converting a temperature from Celsius to Fahrenheit is

 


where F is the Fahrenheit temperature, and C is the Celsius temperature.

 

Your function returns the Fahrenheit equivalents.

 

 

 

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE