Create a program that allows a user to input customer records (ID number, first name, last name, and balance owed) and save each record to a file. Save the program as WriteCustomerList.java. When you execute the""program, be sure to enter multiple records that have the same last name because you will search for repeated first names in part d of this exercise.b.Write an application that reads the file created by the WriteCustomerListapplication and displays the records. Save the file as DisplaySavedCustomerList.java.c.Write an application that allows you to enter any ID number, reads the customer data file created in Exercise 5a, and displays the data for the customer. Display an appropriate message if the ID number cannot be found in the input file. Save the file as DisplaySelectedCustomer.java.d.Write an application that allows you to enter any last name and displays all the data for customers with the given last name. Display an appropriate message if the name cannot be found in the input file. Save the file as DisplaySelectedCustomersByName.java.e.Write an application that allows you to enter any purchase amount and displays all the data for customers with balances greater than the entered value. Display an appropriate message if no customers meet the criteria. Save the file as DisplaySelectedCustomersByBalance.java

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

"Create a program that allows a user to input customer records (ID number, first name, last name, and balance owed) and save each record to a file. Save the program as WriteCustomerList.java. When you execute the""program, be sure to enter multiple records that have the same last name because you will search for repeated first names in part d of this exercise.b.Write an application that reads the file created by the WriteCustomerListapplication and displays the records. Save the file as DisplaySavedCustomerList.java.c.Write an application that allows you to enter any ID number, reads the customer data file created in Exercise 5a, and displays the data for the customer. Display an appropriate message if the ID number cannot be found in the input file. Save the file as DisplaySelectedCustomer.java.d.Write an application that allows you to enter any last name and displays all the data for customers with the given last name. Display an appropriate message if the name cannot be found in the input file. Save the file as DisplaySelectedCustomersByName.java.e.Write an application that allows you to enter any purchase amount and displays all the data for customers with balances greater than the entered value. Display an appropriate message if no customers meet the criteria. Save the file as DisplaySelectedCustomersByBalance.java"

Command Prompt
D:\JavaBatchFile>javac WriteCustomerList.java
D:\JavaBatchFile>java WriteCustomerList
Enter ID number or ZZZ to quit >> 1234
Enter first name >> Cheryl
Enter last name >> Miller
Enter balance >> 1000e
Enter ID number or ZZZ to quit >> zzz
D:\JavaBatchFile>
5b:
Command Prompt
D:\JavaBatchFile>javac DisplaySavedCustomerList.java
D:\JavaBatchFile>java DisplaySavedCustomerList
1234 Cheryl Miller 10000.e
D:\JavaBatchFile>
5c:
Command Prompt
D:\JavaBatchFile>javac DisplaySelectedCustomer.java
D:\JavaBatchFile>java DisplaySelectedCustomer
Enter ID number to search for >> 1234
|1234 Cheryl Miller 1000e.e
D:\JavaBatchFile>
5d:
Command Prompt
D:\JavaBatchFile>javac DisplaySelectedCustomersByName .java
D:\JavaBatchFile>java DisplaySelectedCustomersByName
Enter last name to search for >> Miller
1234 Cheryl Miller
10000.0
Command Pre
D:\JavaBatchFile>
D:\JavaBat
Transcribed Image Text:Command Prompt D:\JavaBatchFile>javac WriteCustomerList.java D:\JavaBatchFile>java WriteCustomerList Enter ID number or ZZZ to quit >> 1234 Enter first name >> Cheryl Enter last name >> Miller Enter balance >> 1000e Enter ID number or ZZZ to quit >> zzz D:\JavaBatchFile> 5b: Command Prompt D:\JavaBatchFile>javac DisplaySavedCustomerList.java D:\JavaBatchFile>java DisplaySavedCustomerList 1234 Cheryl Miller 10000.e D:\JavaBatchFile> 5c: Command Prompt D:\JavaBatchFile>javac DisplaySelectedCustomer.java D:\JavaBatchFile>java DisplaySelectedCustomer Enter ID number to search for >> 1234 |1234 Cheryl Miller 1000e.e D:\JavaBatchFile> 5d: Command Prompt D:\JavaBatchFile>javac DisplaySelectedCustomersByName .java D:\JavaBatchFile>java DisplaySelectedCustomersByName Enter last name to search for >> Miller 1234 Cheryl Miller 10000.0 Command Pre D:\JavaBatchFile> D:\JavaBat
Command Prompt
D:\JavaBatchFile>javac DisplaySelectedCustomersByBalance.java
D:\JavaBatchFile>java DisplaySelectedCustomersByBalance
Enter minimum balance >> 6000
1234 Cheryl Miller 10eee.e
D:\JavaBatchFile>
Transcribed Image Text:Command Prompt D:\JavaBatchFile>javac DisplaySelectedCustomersByBalance.java D:\JavaBatchFile>java DisplaySelectedCustomersByBalance Enter minimum balance >> 6000 1234 Cheryl Miller 10eee.e D:\JavaBatchFile>
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning