Question: c# coding 1. Price Check There is a shop with old-style cash registers. Rather than scanning items and pulling the price from a database, the
c# coding

1. Price Check There is a shop with old-style cash registers. Rather than scanning items and pulling the price from a database, the price of each item is typed in manually. This method sometimes leads to errors. Given a list of items and their correct prices, compare the prices to those entered when each item was sold. Determine the number of errors in selling prices. Example products = ['eggs', 'milk', 'cheese'] productPrices = [2.89, 3.29, 5.79] productSold = ['eggs', 'eggs', 'cheese', 'milk'] soldPrice = [2.89, 2.99, 5.97, 3.291. Price Product Actual Expected 2.89 2.99 5.97 3.29 eggs eggs cheese milk Expected Error 2.89 2.89 5.79 3.29 1 1 The second sale of eggs has a wrong price, as does the sale of cheese. There are 2 errors in pricing. Function Description Complete the function priceCheck in the editor below. priceCheck has the following parameter(s): string products[n]: each products[i] is the name of an item for sale string productPrices[n]: each productPrices[i] is the price of products[i] string productSold[m]: each productSold[i] is the name of a product sold float soldPrice[m]: each soldPrice[j] contains the sale price recorded for productSold [j]. Returns: int: the number of sale prices that were entered incorrectly 1 > using System.CodeDom.Compiler; ... 16 T 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 class Result { } /* * Complete the 'priceCheck' function below. * The function is expected to return an INTEGER. * The function accepts following parameters: * * */ 1. STRING ARRAY products 2. FLOAT ARRAY product Prices 3. STRING_ARRAY productSold 4. FLOAT_ARRAY soldPrice public static int priceCheck(List products, List product Prices, List productSold, List soldPrice) { } 37 38 class Solution...
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
C program to create a method that returns the number of errors in selling prices of the products ... View full answer
Get step-by-step solutions from verified subject matter experts
