Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Which of the following identifiers used in the exerciseTransactions method defin

ID: 641563 • Letter: W

Question

Which of the following identifiers used in the exerciseTransactions method defined at line 45 is a parameter that is being passed on as an argument to another method? (Check all that apply.)

Question 15 options:

thisAccount

testCount

limit

count

Listing 2:

2

3 import java.util.Scanner;

4 import java.util.Random;

5

6 public class AccountTester

7 {

8 Random randomNumbers = new Random();

9 Scanner userInput = new Scanner(System.in);

10

11 public void testAccountClass()

12 {

13 System.out.println(" *** Testing the Account Class ***");

14

15 System.out.printf(" Current Interest Rate: %.2f%%", Account.CURRENT_RATE *

16 100.0);

17

18 System.out.println(" Creating Account Objects");

19 Account accountOne = new Account(5000.0);

20 Account accountTwo = new Account(accountOne);

21 accountOne.displayValues(" Initial Values for Account One:");

22 accountTwo.displayValues(" Initial Values for Account Two:");

23

24 System.out.println(" Exercising Account Transactions");

25 accountOne.credit(0.0);

26 accountOne.debit(-6);

27 accountTwo.credit(-1.50);

28 accountTwo.debit(100.0);

29 accountTwo.debit(5000);

30 exerciseTransactions(accountOne, 100, 500.0);

31 exerciseTransactions(accountTwo, 250.0);

32 accountOne.displayValues(" Updated Values for Account One:");

33 accountTwo.displayValues(" Updated Values for Account Two:");

34

35 System.out.println(" Exercising Future Value Calculators");

36 System.out.printf(" Calculation 1: $%.2f ", accountOne.futureValue(6.5,

37 0.05));

38 System.out.printf(" Calculation 2: $%.2f ", accountOne.futureValue(15,

39 0.05));

40 System.out.printf(" Calculation 3: $%.2f ", accountTwo.futureValue(6.5));

41 System.out.printf(" Calculation 4: $%.2f ", accountTwo.futureValue(15));

42 System.out.println(" *** Testing Complete *** ");

43 }

44

45 private void exerciseTransactions(Account thisAccount, int testCount,

46 double limit)

47 {

48 int count = 0;

49 while( count < testCount )

50 {

51 if( (count % 3) != 0 )

52 thisAccount.credit(getDataValue(limit));

53 else

54 thisAccount.debit(getDataValue(limit));

55 count++;CSC-240 Java Programming

thisAccount

testCount

limit

count

Listing 2:

2

3 import java.util.Scanner;

4 import java.util.Random;

5

6 public class AccountTester

7 {

8 Random randomNumbers = new Random();

9 Scanner userInput = new Scanner(System.in);

10

11 public void testAccountClass()

12 {

13 System.out.println(" *** Testing the Account Class ***");

14

15 System.out.printf(" Current Interest Rate: %.2f%%", Account.CURRENT_RATE *

16 100.0);

17

18 System.out.println(" Creating Account Objects");

19 Account accountOne = new Account(5000.0);

20 Account accountTwo = new Account(accountOne);

21 accountOne.displayValues(" Initial Values for Account One:");

22 accountTwo.displayValues(" Initial Values for Account Two:");

23

24 System.out.println(" Exercising Account Transactions");

25 accountOne.credit(0.0);

26 accountOne.debit(-6);

27 accountTwo.credit(-1.50);

28 accountTwo.debit(100.0);

29 accountTwo.debit(5000);

30 exerciseTransactions(accountOne, 100, 500.0);

31 exerciseTransactions(accountTwo, 250.0);

32 accountOne.displayValues(" Updated Values for Account One:");

33 accountTwo.displayValues(" Updated Values for Account Two:");

34

35 System.out.println(" Exercising Future Value Calculators");

36 System.out.printf(" Calculation 1: $%.2f ", accountOne.futureValue(6.5,

37 0.05));

38 System.out.printf(" Calculation 2: $%.2f ", accountOne.futureValue(15,

39 0.05));

40 System.out.printf(" Calculation 3: $%.2f ", accountTwo.futureValue(6.5));

41 System.out.printf(" Calculation 4: $%.2f ", accountTwo.futureValue(15));

42 System.out.println(" *** Testing Complete *** ");

43 }

44

45 private void exerciseTransactions(Account thisAccount, int testCount,

46 double limit)

47 {

48 int count = 0;

49 while( count < testCount )

50 {

51 if( (count % 3) != 0 )

52 thisAccount.credit(getDataValue(limit));

53 else

54 thisAccount.debit(getDataValue(limit));

55 count++;CSC-240 Java Programming

Explanation / Answer

thisAccount

testCount

limit

thisAccount

testCount

limit

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote