T-Mobile 12:01 PM 36% a ccbcmd-bb.blackboard.com C 1 of 1 Lab 8: Module 6- Arrays 1. Write a program that declares three arrays named price, gty, and amt. Each array should be declared in main0 and...

T-Mobile 12:01 PM 36% a ccbcmd-bb.blackboard.com C 1 of 1 Lab 8: Module 6- Arrays 1. Write a program that declares three arrays named price, gty, and amt. Each array should be declared in main0 and capable of holding 3 values. Make up numbers for price and qty (quantity). (ShoppingCart.java) (4 pts) Write a method to fill the amt array with the product of the corresponding elements in price and gty. (3 pts- create a method within the ShoppingCart class) Write another method to display the values in the three arrays. (3 pts- create a method within the ShoppingCart class) Allow users to change the price and qty for three items. Calculate and display the values in the three arrays after the three items have been entered. (5 pts- use the two methods created in order to calculate the amt values and displaying the arrays) 2. Write a Java program that calculates the sum of a variable sized matrix using a The user should provide the number of rows and columns (6 pts) o Test multiple user inputs (3 x2,4 x4, 6 x 2, etc) A sum should be created for each row, each column, and the total for the matrix (9 pts) Ex: How big would you like your matrix? Rows 7 3 Columns -2 Please enter your row 1? Column 1-3 Column 2-4 Please enter your row 2? Column 1-7 Column 2-40 Please enter your row 3? Column 1-20 Column 2-12 Your total for row 1 is-7 Your total for row 2 i$-47 Your total for row 3 is-32 Your total for column 1 is-30 Your total for column 2 is- 56 Your total for the 3 x 2 matrix is 86

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here