Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

Part 1:

image text in transcribed

Part 2: please fix my delrow, append, delete, and value functions for my subclass.

image text in transcribed

So that they work as intended! on the following:

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago