Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please only focus on part 2! It is in python 3 Part 1: Part 2: please fix my delrow, append, delete, and value functions for
Please only focus on part 2! It is in python 3
Part 1:
Part 2: please fix my delrow, append, delete, and value functions for my subclass.
So that they work as intended! on the following:
I know someone has answered this before but it ended up not working, if you don't mind could you please test it and show it to me as well i would greatly appreciate it. thank you!
(1) (50 pts) Design an Abstract Data Type dnmArr0" as an integer array with dynamic length, using any programming language (please specify). The ADT should meet the following requirement. t should have a constructor and a de-constructor The constructor creates an empty integer array with length of 0 An operation dnmArr.append(int num) inserts an integer num to the end of the dnmArr, and length of dnmArr is increased by one An operation dnmArr.delete(int position) removes the integer at the corresponding position, and decreases the length by 1 An operation dnmArr.length) returns the current length as an integer An operation dnmArr.value(int position) returns the integer value at the corresponding position The ADT should have error handling. For example, if dnmArr.delete(int position) tries to remove an integer from a position that does not exist, the ADT should return an error message Please add comments for the code to be understandable (2) (50 pts) Design an Abstract Data Type "dnmMtx()" as a 2-dimention integer matrix with dynamic size, using any programming language (please specify). dnmMtx() is a subclass of dnmArr). The ADT should meet the following requirement. t should have a constructor and a de-constructor The constructor creates an empty 2-dimention integer matrix with size of (0, 0) An operation dnmMtx.addrow() inserts an empty row at the bottom of the matrix, and increases An operation dnmMtx.append(int rownum, int num) inserts an integer num to the end of row An operation dnmMtx.delete(int rowpos, int colpos) removes the integer at the corresponding An operation dnmMtx.delrow(int rownum) removes the corresponding row, and decreases the An operation dnmMtx.size() returns the current number of columns and the length of the number of rows by 1 #rownum, and length of the current row is increased by 1 row and column position, and decreases the length of the corresponding row by 1 number of rows by 1 longest row corresponding row and column position to remove an integer from a position that does not exist, the ADT should return an error An operation dnmMtx.value(int rowpos, int colpos) returns the integer value at the The ADT should have error handling. For example, if dnmMtx.delete(int rowpos, int colpos) tries message Please add comments for the code to be understandable
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