Trusted by 2+ million users, 1000+ happy students everyday
Showing pages 1 to 1 of 3 pages
Project #1 - bashUsing bash (not a higher level language), construct a program which manages customer files. Each customer has a separate file. Your program will interactively manage customer accounts.Customer File ContentOne file per customer, named the customer's email addressEach customer file contains two records:1.Identification record which has two attributes:Customer EmailCustomer Full Name2.Account record which has four attributes:Apartment Number - format (APT-xx)Monthly Rent AmtAccount BalanceNext Due DateExample customer file contents:firstname.lastname@example.org Bill BoardAPT-5A 1100.00 0.00 2017-10-01Action MenuDisplay a menu which showsEnter one of the following actions or press CTRL-D to exit.C - create a customer fileP - accept a customer paymentF - find customer by apartment numberRead a one character action. Based on the action, do the following:C - CREATE - create a customer fileFrom the terminal, read (each from separate read requests)oCustomer EmailoCustomer Full NameoApartment NumberoMonthly Rent AmtoNext Due DateDefault the Account Balance to zeroCreate a new customer file using the customer's email as the file name. If the file already exists, show an error message (and do nothing).Assume that each of the five attributes should be read before checking for prior existence.P - PAYMENT - accept customer paymentFrom the terminal, read oCustomer EmailoPayment AmountUpdate the customer's file, adding the payment amount to the Account Balance
Found this document preview useful?
You are reading a preview Upload your documents to download or Become a Desklib member to get accesss