Question: Using Java 1. (12 Points) Write a program PrintMatrix.java that performs the following, Ask user to enter number of rows and columns of a matrix

Using JavaUsing Java 1. (12 Points) Write a program PrintMatrix.java that performs the

1. (12 Points) Write a program PrintMatrix.java that performs the following, Ask user to enter number of rows and columns of a matrix . Use loop to print a matrix of random digits (1 through 9).j Option: Total the numbers in each row and print out the row total Sample output Enter number of rows: 3 Enter number of columns: 6 Matrix 923226 535113 1 69 3 14 Row Total 24 18 24 2. (14 points) A group of friends is organizing a ski trip. Write a program CostEstimate.java that performs the following, Hotel room cost is $120 per day and is limited to 4 people. Lift ticket costs as follows For a group with 1-5 people, cost is $90 per person per day For a group with 6-10 people, cost is $80 per person per day For a group with more than 10 people cost is $70 per person People in the group will split the total cost evenly. Define a method called splitCost which takes one parameter, the number of people, calculates the per person price (room cost plus lift tickets cost), then returns the cost per person . . . Call splitCost method in the program to take user input of the size of the group, then estimate the trip cost per person per day. Program should be able to do multiple estimates until user enters -1 to quit Sample output Enter group size (-1 to quit): 2 Cost estimate per person per day: $150.00 Enter group size (-1 to quit): 3 Cost estimate per person per day: $130.00 Enter group size (-1 to quit): 5 Cost estimate per person per day: $138.00 Enter group size (-1 to quit): 7 Cost estimate per person per day: $114.29 Enter group size (-1 to quit): 12 Cost estimate per person per day: $100.00 Enter group size (-1 to quit):-1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!