Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This code is being put into java and i need the answer to also consist of notes throughout the code so I know what each

image text in transcribedThis code is being put into java and i need the answer to also consist of notes throughout the code so I know what each line of code is doing. Thank you!

oject (Class) is to be called Project1.(1 pt) rite a method named getMask that receives a single parameter named table, which is a two-dimensional array of int's. The tMask method should create and return an array mask for the passed-in table array. For each element in the mask array, if t iginal array's corresponding element contains a positive number, the mask array's element should contain a 1. If the original ray's corresponding element contains a zero or negative number, the mask array's element should contain a 0. (4pts) - All declarations to be within methods only. No declarations at the class level. 4 pts - Only Printf statements are to be used. No print or println statements. 4 pts. - Your method should not change the content of the passed-in original table array. (2pts) - Your method should work with any sized table by input of number of rows and number of columns from the keyboard. Validate the input to assure it is a positive Integer no larger than 10 (2pts) - Table array(s) should be declared at beginning of the program module. Input size from keyboard and then declare the size of the table(s) right after (2pts) - Have your name and date at the beginning of the program (1 pt) - Paragraph at the beginning of each module. (1pt) - Use commenting throughout program (1pt) - You are to submit the program source code only. (just the .java) Only one file should be submitted i.e. all modules class and methods should be contained within one file. (will not be graded any other way) - Use good programming format. - Indent 3 to 5 spaces All statements should line up (1 pt) - Declare all variables at beginning of a program module or block (1pt) - Also make sure that open braces are not located at the end of a line of a block of code but instead is located on the next line at the beginning of the block of code. Close braces should line up with open braces (1pt) - Use descriptive variable names (1pt) - Points will be deducted for typographical errors for output. (1pt) - Use an output method in order to output the table in table form (see below) with correct formatting (numbers are to be aligned). Borders are not necessary. Output the tables with labels "before" prior to the original table and "after" prior to the masked table.(4pts) - Input will be from a separate method that will use a random number generator to fill the table initially with whole numbers from 49 to 49 . (2pts) - Methods called: to load original table, create the masked table and to output the tables are to be called from module Main. (2pts) - Last line of output should not be on same line as program summary after program finishes. i.e. last output should include a line feed. (1pt) - Use the proper types of methods: Procedure methods are void and passing information back to main are value return. (2pts) - No static variables. (2pts) - Numbers should line up right justified on the right most digit. Will need to use printf statement properly. No '+', there should be only two parts to printf statement: format part, that's between the double quotes and the list of identifiers. (2pts)

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

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions