Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Homework8 CSS 142 Instructions: Please submit your files to the Canvas submission page for this assignment by the due date. Late homework will not be
Homework8 CSS 142 Instructions: Please submit your files to the Canvas submission page for this assignment by the due date. Late homework will not be graded. Grading Rubric: 70% for correctness-includes: following the requirements of each problem as stated (it is your responsibility to ask for clarifications); using the concepts learned from class; testing your code for correctness; having code that works 30% for style-includes: commenting (block and in-line): spacing between operator and operands; obeys style guidelines indicated during lectures. Purpose: In this homework you will gain more practice writing classes and instantiating objects. You will also practice programming using 2-D arrays. MDArray Part a: Write a class called MDArray containing the following variables and methods: 1. Private data field: mdarray of type doublelU 2. Public constructors: your class should have two constructors-one that takes a 2-D array of doubles and another one that takes a text file name as a String. For the latter one, the text file will contain a 2-D array where the first line is an int representing the number of rows in the array, and each line below that has an int representing the length of the row followed by the values that represent that row in the 2-D array. For example, if the contents of the text file is as follows: 2 4.1 8.9 5 9.5 2.0 7.3 2.1 8.9 3 1.3 5.2 3.4 then it represents a ragged 2-D array with 3 rows, where the first row has length 2, the second one 5 and the third one 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started