How to fix the logical error

Assignment Help Basic Computer Science
Reference no: EM132431065

Problem: Can someone help me figure out how to fix the logical error? Related to business logic OWASP Testing guide 4

int x; x = x + 1; System.out.println("X = " + x);

b. for (i=1; i<=5; i++) ; { System.out.println("Number is " + i); }

c. if ( z > d) ;

{ System.out.println("Z is bigger"); }

d. String m1="one"; String m2="two"; if(m1 == m2) { System.out.println("M1 is equal to M2"); }

e. The formula for the area of a trapezoid is: A = (b1+b2)/2 * h The following Java code is the implementation. Fix the logical error double area; double base1 = 2.3; double base2 = 4.8; double height = 12.5; area = base1 + base2/2.0 * height;

Demonstrate your fixed code work as anticipated with a couple different test cases.

Reference no: EM132431065

Questions Cloud

Determine how do you assign addresses to hosts : As part of this upgrade, you need to determine how do you assign addresses to hosts? What are the advantages and challenges of troubleshooting IPv4 versus IPv6?
How has education of women contributed to social change : What are a few ways groups or individuals are trying to provide an education for all girls?How has the education of women historically contributed to social
Evaluate the two important financial ratios : Evaluate the two important financial ratios that you will use to track health of business and explain how each would provide insight to business performance.
Remaining values are the student scores : Im trying to write a program that opens the student_scores.txt file. The file contains information for 4 Students. All values are separated by a comma.
How to fix the logical error : Problem: Can someone help me figure out how to fix the logical error? Related to business logic OWASP Testing guide 4
Role of technology in business and society : We look at the role of Technology in Business and Society. We look at Cybersecurity, the loss of Privacy; we look at the Use of Robotics;
Cultural Representations of Social Class Assignment : Cultural Representations of Social Class Assignment help and solutions:-In what ways does culture related to social class impact identity
Discuss reasons for the two new auditing roles in oracle : Question 1: Discuss reasons for the two new auditing roles in Oracle 12 C Security?
Calculate Emmis Total Assessable income : Calculate Emmis Total Assessable income and Advise the capital gains tax (CGT) consequences of the above sales - herself and has found a buyer to take over

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Class template for the class set given

Implement the following Set class. A set is a collection of items with no duplicates. The following class implements a set of integers.

  What are active and passive components

What are active and passive components? Categorise the following components into these categories. Mettalized polyster capacitor, Preset Filter circuits, Audio-frequency chokes, FET, Vacuum tubes.

  Quadratic equation to solve

It might help if you define Z = vY so that Z^2 = Y. You should end up with a quadratic equation to solve.

  Information literacy is defined as a set of skills

Which of the following documents are considered primary sources. Information literacy is defined as a set of skills needed to

  Bit array implementation

Both implementations should use the same sets. Using the Timing class, compare the major operations (union, intersection, difference, and subset) of each implementation and report the actual difference in times.

  Describe how customer service programs provide employees

Describe how customer service programs provide employees with "tools." Provide an example from your business or from a brand you admire.

  What was the value of the rrsp deposit

What was the value of the RRSP deposit on December? 1, 2020, if no further changes in interest were? made?

  Cq high school student basketball tournaments

CQ High School Student Basketball TournamentsIn recent years, basketball has been become an increasingly popular sport in CQ towns, thanks to government funding support and sponsors from several organizations including CQU, Woolworth, Harvey Norma..

  Based on the severity of a patient''s illness or injuries.

A triage software system that allows doctors to designate the order in which patients should be treated, based on the severity of a patient's illness or injuries.

  How to get value of column f

How to get value of column F (EA), G, H from EC sheet and How to get column I, J, K valuesto show in C,D ,E

  Explain in your own words the power of if function in excel

Explain in your own words the power of the IF function in Excel, and indicate at least one way in which a person could utilize this function in work or personal life. Provide a rationale for your response.

  Determine whether first normal form

Determine whether first normal form (1NF), second normal form (2NF), or third normal form (3NF) should be the goal when a DBA designs a database.

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