assignment1 - <#rows> and...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 2026 Spring 2010 Assignment 1 1/29/2010 Due: 2/5/2010 11:59 PM In this assignment, you will implement a small program that manipulates the matrix. A matrix is a two dimensional array. Here’s a 2 ×3 matrix, 1 2 3 4 5 6 The matrix and an operator will be passed to your application as a program argument. The format of the argument would be <#rows> <#cols> <data, row by row> <operator>. There are three types of operators, I, D, and T. The meaning of each operator is as follows. I Increase all elements in this matrix by 1. D Decrease all elements in this matrix by 1. T Return the transpose of this matrix. For example, 1) :~> MatrixApplication.exe 2 3 1 2 3 4 5 6 I Returns 2 3 4 5 6 7 2) :~> MatrixApplication.exe 2 3 1 2 3 4 5 6 D Returns 0 1 2 3 4 5 3) :~> MatrixApplication.exe 2 3 1 2 3 4 5 6 T Returns 1 4 2 5 3 6 You can make the following assumptions. The number of elements in the matrix is always <#rows> * <#cols>. All elements in the matrix are integer.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &lt;#rows&gt; and &lt;#cols&gt; are both positive integers. The operators are always uppercased. You dont have to create a class Matrix if you dont know how to do that. Using two-dimensional array is enough for this assignment. C# Coding Conventions {}. Unlike Java, it is recommended that you use this style: for (int i = 0; i &lt; 10; i++) { &lt;statements&gt; } rather than for (int i = 0; i &lt; 10; i++) { &lt;statements&gt; } Variable name. Compose variable names using mixed case letters starting with a lower case letter. For example, use salesOrder rather than SalesOrder or sales_order. Class name. Use MyProgram rather than myProgram, Myprogram, or my_program. Method name. The same as class name. Its recommended that one name his/her method starting with a verb. For example, GetName(), SetName(string name). Save your program in a single file called Program.cs and submit it to CMS. Good luck!...
View Full Document

Page1 / 2

assignment1 - &amp;amp;lt;#rows&amp;amp;gt; and...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online