MYPROGRAMMINGLAB WITH PEARSON ETEXT
MYPROGRAMMINGLAB WITH PEARSON ETEXT
8th Edition
ISBN: 9780134225340
Author: Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 11, Problem 11.18E
Program Plan Intro

Program plan:

  • Modify program textFile as follows:
    1. Include one additional parameter ch of type int.
    2. Within the else contruct, based on value of ch call frprintf or printf to display the header for account information.
    3. Within the while loop of else construct, based on value of ch use fprintf or printf to display the content of client variable.
  • Modify program enterChoice as follows:
    1. Include one additional statement of choice i.e. 5- Display accounts on screen.
  • Modify the main function as follows:
    • Run the while loop till choice is not equal to 6.
    • Modifiy call of textFile in case 1 to provide the function additional argument i.e. choice.
    • Include case 5 to call the textFile function with additional argument i.e. choice.

Program description:

This program is the modified version of transaction processing program given in figure 11.15 of the book.This program included one more option i.e. to print the account details on screen instead of text file in addition to all other option of program in figure 11.15.

Blurred answer
Students have asked these similar questions
(Class Average: Reading Student Records from a CSV File) Use Python Use the csv module to read the grades.csv file from the previous exercise (exercise 9.3). Display the data in tabular format, including an additional column showing each student’s average to the right of that student’s three exam grades and an additional row showing the class average on each exam below that exam’s column. This is exercise 9.3 # Importing csv moduleimport csv# empty list to store datadata = []columns = ["firstname", "lastname", "grade1", "grade2", "grade3"]filename = "grades.csv"for i in range(3):firstname = input("Enter First Name : ")lastname = input("Enter Last Name : ")grade1 = float(input("Enter Grade 1 : "))grade2 = float(input("Enter Grade 2 : "))grade3 = float(input("Enter Grade 3 : "))data.append([firstname, lastname, grade1, grade2, grade3])print()# write data and columns as csv filewith open(filename, 'w') as csvfile:# creating a csv writer objectcsvwriter = csv.writer(csvfile)# writing the…
(python) Write a function startWith(File, Let) that takes a file name and a letter. Each line in the file contains 1 word. The function should store a new file with all the words that start with letter Let. Example: startWith (‘Test1-3.txt’, ‘A’)   Source File: (Test1-3.txt) Output File: (Test1-3New.txt) Hi Airport Airport Apple Hello   Apple   Mango
(JS)Write a function named "tweets" that takes a string as a parameter. If a message can hold at most 280 characters, calculate the smallest number of messages needed to hold all of the text in the input. The function should return the number it calculated.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning