Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Project 02 Materials / C07_P02_HelpAndHints

.docx
Скачиваний:
24
Добавлен:
14.10.2016
Размер:
1.26 Mб
Скачать

project 2: help and hints

Application Development

The goal of this project is to give you concrete experience working with a Java program to perform floating point computations, and to display the results of these computations. You will also demonstrate your ability to find information in a Java program and deduce what it means from context. In addition, you are expected to demonstrate the skills of following instructions and honoring requirements.

This project is a continuation of project 1. In fact, for project 2 you will be updating your project 1 source code, or you can use the project 1 source code provided by your instructor. Some of the code may still be unfamiliar to you, however, if you apply what you know, you should have no problems. Don’t be afraid to jump in and try.

DELIVERABLES

Your assignment is to:

Develop a Floating Point Calculator capable of addition, subtraction, multiplication and division of two floating point numbers.

Modify the source file comments in your calculator program so it is clear that this project is yours, while still recognizing the work of the original author.

Test the program and document the results.

PLAN YOUR APPROACH

Establish an approach for how you will acquire the information necessary to successfully complete a working Floating Point Calculator. That is, decide what steps you will need to complete to get to "done.”

DO THE WORK

Update the calculator source code to make the calculator operate correctly.

Test the program and document the results of your testing.

SUBMIT YOUR DELIVERABLE

Ensure that you know how, when and where to submit the deliverable.

HINTS FOR YOUR ASSIGNMENT

DELIVERABLES

Define "done" for each deliverable:

A Floating Point Calculator where:

The addition, subtraction, multiplication and division of two floating point values work correctly.

Input operands can be in either decimal or scientific notation

The result field changes appropriately based on the function just completed.

Comments in the source code have been updated so it is clear that this is your program, while still recognizing the work of the original author.

Documented proof that your calculator program functions correctly.

PLAN YOUR APPROACH

Step 1: Download the baseline source code and bring it into Eclipse.

Step 2: Find the places in the baseline source code where you need to add the code to correctly make the program do the addition, subtraction, multiplication and division.

Step 3: Find the places in the baseline source code where you need to modify the comments.

Step 4: Test the calculator program and document the results.

Step 5: Submit your work.

DO THE WORK

Step 1: Download Files from the LMS

You will find the source code for the Integer Calculator on the LMS. You may use that source code, or you may use your own Integer Calculator solution source code, as a starting point to produce the floating-point calculator.

Use the steps required to download and establish this baseline in a manner similar what you did in class for Exerices02.

Step 2: Update the Integer Calculator Source Code

In the project baseline source code you will need to:

Replace the two input operand variables so they can hold double values as opposed to long values.

Modify the methods that process the two input operands to check for valid floating-point values, in both the regular decimal notation (e.g. 15.345) as well as scientific notation (e.g. 1.534E1).

Change the word “Result” to “Sum”, “Difference”, “Product”, or “Quotient” depending upon which operator button has been pressed. As soon as any character is added or removed from either of the two operand input fields, the result must be cleared and the word “Result” must once again appear to the left of the result output box.

Modify the comments in all the source files, so it is clear that this program is your program, while still recognizing the work of the original author.

Produce a document, in Microsoft Word, explaining how you tested the program to ensure that it works properly.

Step 3: Update the Comments

You are expected to submit a well-documented program following the style provided in the baseline. One important element is to change the authorship to your name. If you have doubts about whether your program is adequately documented, please show your program to the professor for guidance.

Step 4: Test the Program and Document the Results

There are two parts to this step: determining what to test, and documenting the results of your testing.

Planning what to test:

Identify the functions that need to be tested. For example, do you need to test the entire program, or just the items that you have added or modified?

Consider how to best test them (hint: consider testing the "boundary conditions")

Documenting the results of your testing:

Images of the Calculator application window that show the output your program produced. Capture images for each of the four functions. These images will prove that your program is working properly and that the result is properly labeled for each. You must demonstrate that you understand the program and how to exercise it.

For each of the window images that you capture, you must explain what is being shown and why you believe this output is indeed what should be displayed. (e.g. Since this application specifies the kind of result and this allows us to deduce which button was pressed, but you must still specify which button you pressed to produce the result. You should also show the errors that the program detects and explain what is wrong with the input in order to justify the fact that the error message is being displayed.)

Step 5: Submit Your Work

Just as you did with exercise 2, to create your deliverable package you must rename the downloaded folder so that it starts with your Student ID. In this case, however, your Student ID must be followed by a blank space, then followed by the string, “Project2.” (Example: AZrimsek Project2)

The downloaded folder contains a source code folder named “src.” Within the “src” folder you will find two “Package” folders: “integerCalculator” and “integerCalculatorMain.” Within each “Package” folder you will find one class file, each ending with “.java.” A “main” method will be found in the “IntegerCalculatorMain.java” class file in the “integerCalculatorMain” package in the “src” folder in the project folder.

Change the name of these files from “Integer…” to “FloatingPoint…”. This can be easily done using the “Refactor” menu and selecting the “Rename” menu item. You do not need to create any other package folders or class files to complete this assignment. Also, you do not need to create or view any of the .class files.

You are ready to zip the folder containing your project 2 deliverables into an archive and upload it to the LMS when you have:

Updated the calculator program so that it meets the documented requirements.

Created the Microsoft Word document that describes how you tested your calculator program.

When you are finished producing this document, add it into your project folder at the top level where you will find the “bin” and “src” folders. The name of this document must start with your Student ID, be followed by a blank and then finish with: “Project2 Output.doc.” (Example: AZrimsek Project2 Output.doc)

Checked all of your deliverable items against the Project 02 grading form

Also, don't forget to produce and submit your Engineering Notebook entries as required.

Be sure to complete the above tasks before the specified deadline.

©iCarnegie - Distribution or copying without permission is prohibited.

Соседние файлы в папке Project 02 Materials