Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C# a. Create a program named WriteCustomerRecords that allows you to enter da

ID: 3832256 • Letter: I

Question

In C#
a. Create a program named WriteCustomerRecords that allows you to enter data for your business's customers and saves the data to a file.
Create a Customer class that contains fields for ID number, name, and current balance owed.

b. Create a program named ReadCustomerRecords that reads the file created in Exercise 4a and displays each customer's data on the screen

c. Create a program named FindCustomerRecords that prompts the user for a customer number, reads the file created in Exercise 4a, and
displays data for the specified record.

Explanation / Answer

using System; using System.IO; class Inventory { static void Main() { Console.Write("How many items would you like to enter? "); FileStream file = new FileStream("ItemsSold.txt", FileMode.Create, FileAccess.Write); StreamWriter writer = new StreamWriter(file); int num = Convert.ToInt32(Console.ReadLine()); int itemNum = 0; string desc; double price; for (int count = 0; count