Question: Mobile Business Programming Exercise 1. Which ones are valid? (Please estimate each one of the following statements) int x y = 3; string appName =

Mobile Business Programming Exercise

1. Which ones are valid? (Please estimate each one of the following statements)

int x y = 3;

string appName = Girls Crush;

float RealNumber = 3.11;

String [3] myUsers = {Eric, Steve, Linda};

ArrayList values = ArrayList ( );

int [ ] income = new int [5];

float abc = 3.22

2. Fill out the blanks

________ (a > b)

{ sum = a+b; }

_________

{ sum = 0; }

3. Fill out the blanks

___________ getTotal (int a, int b)

{

total = a + b;

______________ total;

}

4. Fill out the blanks

___________ method1 (String txt1, String txt2)

{

_____________ comparison;

comparison = txt1.equalTo(txt2);

}

5. What is the final result, given that a = 1, b =2, c =3, and d =5?

a<=d || a>3 || c > d || b < d

6. What is the final result, given that a = 100, b =99, c =93, and d =101?

a<=d && c < 98 && b < d

7. What is the final result of the variable sum, given that a = 100, b =99, c =93, and d =101?

if (a > d || b < c)

{

sum = 100;

}

else

{

sum = 0;

}

8. Fill out the blanks

___________ method2 (String txt1, String txt2)

{

_____________ comparison;

comparison = txt1.equalTo(txt2);

if (comparison)

{

___________ The two text messages are the same.;

}

else

{

___________ The two text messages are different.;

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!