Starting from:

$30

CPT120-Assignment 2 Solved

For this assignment, assume that you are a freelance programmer creating a small tool or a utility program of your own choosing to add to your portfolio of simple Java applications. With this project you aim to demonstrate to potential employers or clients how you can:

1. Create a small tool or utility program using (exclusively) a limited set of fundamental code concepts (detailed in section 4.1 below) and,

2. You are able to analyse and evaluate in your code documentation (see requirements in section 4.2 below).

Note: You must not just “throw in the concepts” to your program just because they need to be there; it should be clear from the code why a certain concept should be there and you must further explain these through your comments. You will also need debug your code on your own and document any issues, etc. You are given marks on your ability to fulfill all requirements of this document.

Develop this assignment in an iterative fashion (as opposed to completing it in one sitting). You can and should get started now as there are concepts from the week 1 lessons that you can incorporate from now itself.

If there are questions, you must ask via the relevant Canvas discussion forums in a general manner (replicate your problem in a

4. Assessment details
Note: Please ensure that you have read sections 1-3 of this document before going further.

Your code must meet the following code requirements (section 4.1) and documentation requirements (section 4.2).

In places where this specification may not tell you how exactly you should implement a certain feature, the programmer (you) need to use your judgment to choose and apply the most appropriate concepts from class materials..

4.1) The following code requirements/concepts must be applied to demonstrate your knowledge of lesson materials and approaches; must refer to corresponding rows in the rubric (section 9

C1. Code presentation and format – The program must be entirely in one Java class (one .java file). The name of the class (file) must be chosen to match the application (default names such as AssignmentX.java) will not be accepted. Code must be formatted consistently (Tip: use Eclipse→Source menu→Format before every submission). Must not include any unused/irrelevant code (even inside comments); what is submitted must be considered the final product.

C2. Data types and user inputs - Must use Scanner or JOptionPane. The program must take at least one numerical input and store in a variable of a numerical data type. The program must also take at least one String input and store in a suitable variable.

C3. else if statements – Must not have redundant conditions.

C4. while loops to repeat; no for, do..while, recursion, or any other form of repetition. while-loop condition must fail eventually. Must not use break, continue, return, System.exit or similar branching for terminating loops.

C5. Accessing and modifying values in (standard) arrays using while loops. No ArrayList or similar data structures. Students must demonstrate their ability to manipulate (standard) Java arrays on their own without using external classes/libraries.

C6. Create methods in addition to the ‘main’ method. Must not use static anywhere in the program except in the main method.
4.2) Documentation requirements. Must refer to corresponding rows in the rubric (section 9).

D1. The code comments in this assignment must focus more on the analysis of your approaches and their evaluation instead of simply translating the Java code to English (see rubric in section 9 of this document; examples will also be given in lessons). Write comments before code blocks (e.g. before methods, loops, ifs, etc. where you can have { }) and important variable declarations.

D2. Explain any code requirements that you have not met and all bugs (situations that might cause the program to crash or behave abnormally) in the approximate locations they originate within your code. Bugs imposed by limitations in the lesson topics such as input type mismatches need not be corrected in code but they still must be documented, if they exist. If you do not have bugs, you must explicitly say that there are none. Tip: A good programmer knows the limits of their program. If doing B2, explain any standard code requirements that you may have violated due to the bonus requirements.

More products