Introduction
Java,,,2D,github
Requirement
6/24/16, 22:15 Homework 02 - CSCI-A 343 Data Structures - Summer 2016
Page 1 of 2
CSCI C343 - Data Structures
Summer 2016
Homework 02
Due Date
Friday, June 24 th 2016, 11:59pm on IU GitHub.
Work Policy
Homework for C343 is to be done individually - no group solutions or cooperative work.
Tasks
Time Complexity analysis from ADT to implementation [total: 100 points]
A. Time Complexity analysis
[40 points]
1. Textbook Exercises 3.12, from (a) to (h)
[5 points each]
B. from ADT to implementation
[60 points]
1. Define an ADT for a two-dimensional array of integers.
Specify precisely the basic operations that can be performed on such arrays.
You may refer to the ADT for a list of integers, as shown in Example 1.4 on page 9 of the
textbook.
[20 points]
2. Specify an ADT for two-dimensional arrays of integers in the form. of an interface (or abstract
class declaration) in Java.
Detail the functions, their parameters, and their return types.
Name your Java file Int2DArray.java and save it in your hw02 directory.
[20 points]
3. Write an implementation of your ADT for two-dimensional arrays of integers.
Name your Java file Int2DArray2.java and save it in your hw02 directory.
[20 points]
4. Note: the list of operations does not need to be all- comprehensive: you may focus on the
operations that you think are most important for working with 2D array of integers.
6/24/16, 22:15 Homework 02 - CSCI-A 343 Data Structures - Summer 2016
Page 2 of 2
5. Submit all your files to IU GitHub under hw/hw02/ .
Homework 02 Submission Instructions:
1. In addition to the above two .java files, also submit a plain-text file named hw02.txt in which you
answer Task A and Task B.1.
1. At the top of your hw02.txt file, include “C343 / Summer 2016”, “Homework 02”, your full
name and your IU username (i.e. your IU account) in the hw02.txt file.
2. Make sure that your plain-text document is clearly readable by anyone; plain-text documents need to use either:
ASCII encoding (7-bit, allows no accents/smart quotes/etc.), or
UTF-8 encoding (capable of encoding all sorts of characters) ← preferred for plain-text submissions.
(…otherwise your output may end up garbled…)
3. Do not use any other document file formats: submitted files other than plain text (file formats
such as .pdf, .doc, .docx, .html, .xml, etc…) will be ignored.
2. all submissions need to be plain-text files, placed within a directory named “hw02”, which in turn
needs to be inside a top-level directory named “hw”, as explained above.
3. Turn in your Homework 02 by 11:59PM on Friday, June 24 th 2016, to your C343 repository on IU
GitHub C343/Summer 2016.
4. When you turn in your homework on IU GitHub, it is your responsibility to verify the contents of
your uploaded file, by double-checking the content of your repository on
Summer2016.
5. Please do not omit your IU username from the content.
6. P.S.: your username should in fact be your IU username, not the word your username…
Last updated: June 22, 2016
mitja ⊛ indiana ⋅ edu