reset password
Author Message
rchatte
Posts: 5
Posted 10:05 Aug 23, 2019 |

Professor Knaur how specific  are the requirements for your projects.

For example in Homework 01: CS2011 Problem 01: 2D Array  can we Calculate the sum as they are randomly generated or do we have to do everything separately?

 

 

axu11
Posts: 4
Posted 10:17 Aug 23, 2019 |

I have this question too. 

For problem 01 it says “be sure to use appropriate methods”, so are you looking for multiple methods?

Also does it matter what we name our java files/class names?

kknaur
Posts: 540
Posted 11:19 Aug 23, 2019 |

You may choose appropriate Java names for your files / classes.

You should try to keep the methods as atomic as possible.  A good rule of thumb is a one task per method rule.  I would have a method to determine the arrays structure, a method to randomly generate the data (you could combine these two into one method) and then a method for each operation.  I want to see that you can break your code into smaller logical units of work.

ByronS
Posts: 4
Posted 20:48 Aug 25, 2019 |

When it comes to the section about Display Array, is it a necessary to use System.out.printf() or is it fine to do it with a for loop?

dliang
Posts: 35
Posted 21:51 Aug 25, 2019 |
ByronS wrote:

When it comes to the section about Display Array, is it a necessary to use System.out.printf() or is it fine to do it with a for loop?

I mean it won't bother too much in for loop, it just looks much better and organizes when you display the array.

kknaur
Posts: 540
Posted 08:56 Aug 26, 2019 |

You don't have to use printf if you can figure out another way to make the output look nice.  It is a good idea however to figure out how printf works because it is a very powerful method for formatting your output.