Evaluate possible solutions-weigh the strengths

Assignment Help JAVA Programming
Reference no: EM131587378

Java programs tend to have three types of errors: javac compiler errors, syntax errors, or logic errors. Javac errors are usually related to misspelled commands, filenames, or improper installation of Java, whereas syntax errors are generated by the compiler. When you compile a program, sometimes one syntax error may generate multiple error messages and sometimes multiple syntax errors may generate only one error message. Programs with logic errors will compile cleanly but will not provide the correct output for a given input. These logic errors are often more difficult to find and fix than syntax errors.

In programming, there are many strategies available for solving such errors or problems. The five-step approach is one of the most common. These five steps include:

Specify the problem-identify the problem as specifically as possible. Be sure to include details of what you want to accomplish (the goal state).

Analyze the problem-learn as much as you can about the problem. Some techniques that can be used in this step include brainstorming, research, and talking to other people about the problem.

Develop a set of possible solutions-usually there is more than one way to solve a problem. Using the same techniques as in Step 2, think of possible solutions. It often helps to consider how you solved similar problems in the past.

Evaluate possible solutions-weigh the strengths and limitations of each solution you discovered in Step 3.

Choose a solution-consider several factors such as time required, financial cost, practicality, and so forth.

When you write a Java program in this course, you typically start with a template that you have copied and pasted from a previous program into your Java editor. You then modify this template to create the code you need. Usually, the code will start with some information that is input into the program (via user keyboard input for simple programs or later by reading a data file). The program then processes the information and creates output (once again, simple programs send output to the screen, more complex programs may send output to the file and error messages or confirmation messages to the screen).
For this Discussion:

Assume you have written a Java program that takes four input variables (integerOne, integerTwo, integerThree, integerFour) and calculates an output variable (resultOut) using the following formula: resultOut = (integerOne + integerTwo) * integerThree - integerFour .

Using your text and/or the Internet as a resource, list three different types of syntax errors the Java compiler may find in your program. Then, use the five problem-solving steps listed above to determine how you will fix each type of error. Be sure to clearly highlight the five steps within your posting.

Finally, assume your program compiles cleanly with no syntax errors. You input the values 2, 3, 4, 5 and the valueOut is computed to be 17 (it should be 15). Specify how you will use the five problem-solving steps to find the logic error.

Reference no: EM131587378

Questions Cloud

Describe and explain the shape of the yield curve : Describe and explain the shape of the yield curve. What does the curve tell us about the anticipated future of the economy?
Pf is generated by a finite set of circuits : In the proof of Theorem (from (c) to (a)), show that the subcases (A3), (B1), and (B3) cannot occur.
Small fast-food restaurant with three other partners : he received from the sale of his boat in the stock market or in a small fast-food restaurant with three other partners.
Product or service to the organization : Create a 2- to 3-screen wireframe that demonstrates your ideas for the product or service to the organization.
Evaluate possible solutions-weigh the strengths : Evaluate possible solutions-weigh the strengths and limitations of each solution you discovered in Step 3 - Choose a solution-consider several factors such
What role does monetarism have in current monetary policy : What role does monetarism have in current monetary policy? Has Monetarism been an effective tool for conducting monetary policy?
Consistently run large balance of trade deficits : The US economy has consistently run large balance of trade deficits and large balance of current account deficits since the 1980’s.
Condition that the graph is planar : Let G be a graph. Then G is planar (resp. outerplanar) if and only if each block of G is planar (resp. outerplanar) ? Let G be a ring graph.
Design the logic for a program : Draw a flowchart and write pseudocode to design the logic for a program that allows a user to enter 12 numbers.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd