Writing a JAVA program to manage a student database & Week 8 DIscussion!

profileclements89
williamclementsproject4a.docx

Description:

This program demonstrates my knowledge of what has been learned in previous class and writing a program to calculate the terms of the following sequence of numbers: 0 1 2 5 12 29 ... where each term of the sequence is twice the previous term plus the second previous term. The 0th term of the sequence is 0 and the 1st term of the sequence is 1.

Variables:

The variables in my program will be multiple ones so unless asked to, am not including here this time.

Correct Compilation:

A screen shot of my program as it compiled correctly:

Test Cases:

Listed below is a table of my 4 test cases including what was input into the program and what my expected output was:

Input

Output

Expected Output

(All Tests Passed)

Choose between Iterative or Recursive Radio buttons: Iterative

Enter n: 0

Results: 0

Efficiency: 0

Results: 0

Efficiency: 0

Choose between Iterative or Recursive Radio buttons: Iterative

Enter n: 1

Results: 1

Efficiency: 0

Results: 1

Efficiency: 0

Choose between Iterative or Recursive Radio buttons: Recursive

Enter n: 2

Results: 2

Efficiency: 3

Results: 2

Efficiency: 3

Choose between Iterative or Recursive Radio buttons: Recursive

Enter n: 3

Results: 5

Efficiency: 5

Results: 5

Efficiency: 5

Below are a series of screen shots of running my 4 program test cases.

Test Case 1:

Test Case 2:

Test Case 3:

Test Case 4:

Issues/Limitations/Closing Discussion:

Below are some issues and limitations that I ran into while writing, compiling, and running my program.

1. This program is limited to not allowing for a user to put in a letter but if one is put in no matter if upper or lower case, the program will do nothing. Does not even give an error message.

2. This program is limited to not allow user to enter a digit that is too large of a number/answer. If tried, the program will do nothing. Does not even give an error message.

3. This calculator program is only limited to being able to find the result and efficiency of what number is put in the n box and results & efficiency will depend on if Iterative or Recursive is chosen.