We will record a customers order as an array of five


Question: Suppose that we are selling boxes of candy for a fund-raiser. We have five kinds of candy to sell: Mints, Chocolates with Nuts, Chewy Chocolates, Dark Chocolate Creams, and Sugar-Free Suckers. We will record a customer's order as an array of five integers, representing the number of boxes of each kind of candy. Write a static method combine Order that takes two orders as its arguments and returns an array that represents the combined orders. For example, if order1 contains 0, 0, 3, 4, and 7, and order2 contains 0, 4, 0, 1, and 2, the method should return an array containing 0, 4, 3, 5, and 9.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: We will record a customers order as an array of five
Reference No:- TGS02457056

Now Priced at $15 (50% Discount)

Recommended (94%)

Rated (4.6/5)