ttexp

Project Times Tables with Exponent

Create and print a 2D Times Tables with variables Rows, Cols with Exponent

Tasks

  1. Fork this repository.
  2. Open a new sketch in Processing on your laptop and name it times_tables
  3. Create a public class TTE in a separate java tab
    1. Add one method public static <type goes here> ttexp() that takes in 3 int parameters rows_, cols_, exp_
    2. create and return a 2D array from this method with values like the ones shown above
    3. Use 2 nested for loops to do this.
  4. Ensure that the main tab in processing has the name times_tables.
    1. Create int global variables rows, cols, exp and assign some initial values.
    2. Create a global 2D array named tt of type long. Do not initialize it here!
    3. In setup() call the static method ttexp() in class TTE and assign the returned value to tt.
    4. Write a function print_ttexp(). Inside this function, use two enhanced nested for loops to print the resulting times tables as shown above.
  5. Test with various values of rows, cols, and exponent.
  6. Upload the times_tables.pde and TTE.java to your forked repository ttexp on Github & Commit.

Grading Rubric

Grades will be assigned for 2 categories equally weighted:

  1. Following the instructions above STRICTLY!!
  2. Correct numerical results for various rows, cols, exponent as shown above
  3. Code should be written following proper naming/coding standards and best practices. Results should be properly formatted to look like a table.