Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 185835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:32:28+00:00 2026-05-11T15:32:28+00:00

I’ve been working on my project about bank account transactions (withdraw, deposit, check cashed,

  • 0

I’ve been working on my project about bank account transactions (withdraw, deposit, check cashed, and balance inquiry) using ‘account.txt’. My TA said that I have to use temporary file. This temporary file will read line by line to find what the user is looking for. However, I did not understand this temporary OPEN file at all. Does anyone explain what that is, and if it’s possible, would you attach example of it?

Here are the project instructions: This project is about writing a program to perform transactions on bank accounts. You will be given a file which contains all the accounts in the bank (the file is named “account.txt”). Your program is to provide an interactive menu for users to perform transactions on these accounts. Your program needs to update the account file after each transaction. The user may perform transactions on accounts that are not available. Your program needs print an error message on the screen and return to the menu. In addition, your program needs to print whether a transaction is successful. For unsuccessful transaction, your program will print out the reason for the failed transaction.

Your program needs to be able to handle the following transactions:

  • Deposit money into an account
  • Withdraw money from an account
  • Check cashed against an account
  • Balance inquiry of an account

There is a limit on how many checks can be cashed against a saving account. The limit is 2 checks per month. There is a $0.25 penalty for each check cashed over the limit. If there is enough fund to cash the check but not the penalty, the transaction should go through and the resulting balance would be zero.

Here is the format in the account file for one account (data fields are separated by exactly one space):

Account type, S for saving, C for checking (1 character) Account number of 5 digits Last name of account holder (15 characters) First name of account holder (15 characters) Balance of the account in the form xxxxx.xxx An integer field indicating how many checks have been cahsed this month (three digit) An interest rate in the form of xx.xx (e.g. 10.01 = 10.01%) For names with fewer than 15 characters, the data will be padded to have width of 15 characters. 

Here is an example of the account file:

C 12345 Smith           John              100.000  10  0.00 S 45834 Doe             Jane             3462.340   0  0.30 C 58978 Bond            Jones              13.320   5  0.00 

*Creating temporary file There is a way in FORTRAN to create a temporary file. Use: OPEN(UNIT = , STATUS = ‘SCRATCH’, …) There is no need to provide (FILE = ””). By using a temporary file, you can copy the accounts from the account file to the temporary file. Then when you copy the data back from the temporary file to the account file, perform the necessary transactions. Your program should not copy accounts between these two files if a transaction is to be failed.

Please forgive my english, I’m Japanese.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:32:29+00:00Added an answer on May 11, 2026 at 3:32 pm

    The are saying that a statement such as:

    OPEN (7, ACCESS = 'DIRECT',STATUS = 'SCRATCH') 

    You can create a temporary file–one that will only live until you close it, and not be saved to disk. This file needs no name (it’s never going to be referred to by name) just a unit number (in my example 7).

    You can use this file to hold the account information temporarily during a transaction. You need this because, when you are inserting rows into the real file, and you don’t want to overwrite subsequent data. So they are saying:

    • Copy everything to a temporary file
    • If the transaction succeeds, copy the data back to the main file but
      • Omit rows that are to be deleted
      • Add in the rows that are to be inserted

    Does that help?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I don't have much knowledge about the IPv6 protocol, so sorry if the question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.