Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Cis 22B Lab Part C Homework 1 100 Points One Dimensional Arrays 22B H 1A.cpp-Binary Search: Find and fix errors 22B H 1B.cpp Pr8-3 Bin
Cis 22B Lab Part C
Homework 1 100 Points One Dimensional Arrays 22B H 1A.cpp-Binary Search: Find and fix errors 22B H 1B.cpp Pr8-3 Bin 22B H 1 Insertion Sort: Find and fix errors S.cpp -Binary Search: Code Review Ccpp Search a Sorted List of Strings Project: Searching a Sorted List of Strings using Binary Search The input file fruits.txt contains up to 100 lines. On each line there is a number representing the price of a produce followed by the produce's name. You may assume that the produce's name consists of a single word, all letters in the name are in lowercase except the first one, and the names in the file are in alphabetical order, as shown below: 0.75 Apple 1.25 Apricot 0.75 Banana 2.99 Blueberry Create the input file using data on the next page. Read data from file into two parallel arrays. Use arrays of maximum size 100. In case the input file contains data for more than 100 names, print an error message such as The file contains more than 100 lines!" and terminate the program array of names. Simulate students Change the Binary Search function to search the buying fruits by calling Binary Search in a loop as it is shown in Program 8-3. Keep track of the students' choices in another array (a frequency array). When done searching, write the arays to another file named results.txt, as shown below. 15 Apple ($0.75) 0 Apricot ($1.25) 9 Banana ($0.75) 18 Blueberry ($2.99) The first number on each line represents the number of items sold: 15 apples, 9 bananas, Grading Program 1A Program 1B Program Pr8-3 BinS Program 1C Self Assessment Report 15Points -20 10 50Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started