$30.00
For Sale or Wanted Message Board
Please read the entire assignment carefully before beginning. In this assignment, you’re going
to develop a simulated message board that monitors items wanted and items for sale and looks
for matches. When a match is found, e.g. there is a bike for sale for $50 and a bike wanted,
where the buyer will pay up to $60, then the item is removed from the message board.
There is a file on Canvas called items.txt that includes up to 100 wanted or for sale items in five
categories: bike, microwave, dresser, truck, or chicken. Each line in the file is one item. There is
also a driver file that opens the file, reads each line, and uses an array of structs to store the
items. The driver code assumes there will never be more than 100 lines in the file, therefore, the
array of structs has a fixed size of 100 to represent the items available on the message board.
Each struct represents an item and has a type, such as bicycle or truck, a price, and whether it
is for sale or wanted. (The for sale or wanted is represented as a Boolean, where 0 is for sale
and 1 is wanted.)
The data in the file is read into the array by the driver program, your program needs to read the
array and check if there is a match between the existing items in the message board. There are
two options to consider:
Match is not found in the new array
If a match is not found in the array, print the information about the unmatched item using the
commands:
cout<<”Match not found”<
WhatsApp us