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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:30, bargasdevon123
To insert a column without using commands in any tabs, a user can -click and then click insert column.
Answers: 3
image
Computers and Technology, 22.06.2019 22:00, delawdermia27
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. the highest speed measured was 78.1 mbps. the complete list of 50 data speeds has a mean of x overbarequals16.11 mbps and a standard deviation of sequals18.65 mbps. a. what is the difference between carrier's highest data speed and the mean of all 50 data speeds? b. how many standard deviations is that [the difference found in part (a)]? c. convert the carrier's highest data speed to a z score. d. if we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant? a. the difference is nothing mbps.
Answers: 3
image
Computers and Technology, 23.06.2019 17:20, Morehollie9428
What is the best assassins creed game?
Answers: 2
image
Computers and Technology, 23.06.2019 18:00, larry5007
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
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 in other subjects:

Konu
Mathematics, 23.08.2020 01:01