subject

A customer wants to buy a pair of jeans, a pair of shoes, a skirt, and a top but has a limited budget in dollars. Given different pricing options for each product, determine how many options our customer has to buy 1 of each product. You cannot spend more money than the budgeted amount. Example priceOfJeans = [2, 3] priceOfShoes = [4] priceOfSkirts = [2, 3] priceOfTops = [1, 2] budgeted = 10 The customer must buy shoes for 4 dollars since there is only one option. This leaves 6 dollars to spend on the other 3 items. Combinations of prices paid for jeans, skirts, and tops respectively that add up to 6 dollars or less are [2, 2, 2], [2, 2, 1), (3, 2, 1), (2, 3, 1]. There are 4 ways the customer can purchase all 4 items. Function Description Complete the getNumberOfOptions function in the editor below. The function must return an integer which represents the number of options present to buy the four items. getNumberOfOptions has 5 parameters: int[] priceOfJeans: An integer array, which contains the prices of the pairs of jeans available. int[] priceOfShoes: An integer array, which contains the prices of the pairs of shoes available. int[] priceOfSkirts: An integer array, which contains the prices of the skirts available. int[] priceOfTops: An integer array, which contains the prices of the tops available. int dollars: the total number of dollars available to shop with. Constraints 1 sa, b, c, d < 103 1 s dollars < 109 1 s price of each item < 109 Note: a, b, c and d are the sizes of the four price arrays

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
What allows you to create a wireless connection among your smart devices
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
question
Computers and Technology, 24.06.2019 09:40
Healthy study habits are best described as
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Create a string list. 2. use console.readline() to collect values of firstname, lastname, street, city, state, zip, save them to list. 3. write a simple linq statement, call method uppercasewords() to change first letter to uppercase. 4. create a foreach statment to display the information. public static string uppercasewords(string value) { char[] array = value.tochararray(); if (array.length > = 1) { if (char.islower(array[0])) { array[0] = char.toupper(array[0]); } } for (int i = 1; i < array.length; i++) { if (array[i - 1] == ' ') { if (char.islower(array[i])) { array[i] = char.toupper(array[i]); } } } return new string(array);
Answers: 3
You know the right answer?
A customer wants to buy a pair of jeans, a pair of shoes, a skirt, and a top but has a limited budge...
Questions
question
Physics, 04.12.2020 20:00
question
Mathematics, 04.12.2020 20:00
question
Mathematics, 04.12.2020 20:00
question
Mathematics, 04.12.2020 20:00
question
Mathematics, 04.12.2020 20:00
question
Mathematics, 04.12.2020 20:00
Questions on the website: 13722363