954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

If statements

hiya i need to create these if statements please can someone show me how to create them

i have attached an image alongside this

thank you

so far i have this

[TEX] <code>public class Logic2 {
    int Val1, Val2, Val3, Result1, Result2;
    // creating 1,2,3 integers

public void Calculations (int Val1,int Val2,int Val3){


    Result1 = Val3-Val1*Val1;
    Result2 = Val3 - Val2*Val2;
}
// Simply just doing calculation for values and then sqauring them

public void setVal1(int newVal1Value)
 {
     Val1 = newVal1Value;
 }
 public int getVal1()
 {
     return Val1;
 }
 // Created get and set for val1
 public void setVal2(int newVal2Value)
 {
     Val2 = newVal2Value;
 }
 public int getVal2()
 {
     return Val2;
 }
 // Created get and set for Val2
public void setVal3(int newVal3Value)
 {
     Val3 = newVal3Value;
 }
 public int getVal3()
 {
     return Val3;
 }
// Created Get and Set for Val3</code> [/TEX]


sorry i did not highlight i dont know how to

Attachments Varialbes.jpg 67.88KB
furqanishaq
Newbie Poster
14 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

if(result1result2){System.out.ptintln("Test two pass")}
if(val1val2){System.out.ptintln("Test three pass")}
if(!(val1>val2) && !(val3>val2)){System.out.ptintln("Test four pass")}

rushikesh jadha
Junior Poster in Training
89 posts since Dec 2011
Reputation Points: 4
Solved Threads: 11
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You