de? 3- What is the expected output of that 1 class AAA 2. { public int x, y; public float F(int a, float b) {return a * b;} public int F(int a, int b) { return a + b;. }' public AAA (int a, int b) {x = a; 3 4. 8. 6. y = b;} 10 } class BBB 11 12 { públic int z; public float w; public BBB.(int a, float b, int c, int d) : ba {z = a; 13 14 15 16 17 } 18 static void Main (string[] args) 19 ( W = b;} %3D %3D = new AAA(5, 6); ВВB Obj2 3D new BBB (1, 2, 4, 5); Obj2.F(2, 5); Obj2.F(2, 5.0f); 20 AAA Obj 21 22 int R1 23 float R2 = Console.Write(R2); 24 25 }

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 18RQ
icon
Related questions
Question

Explain

3- What is the expected output of that code?
1 class AAA
2. {
public int X, Y;
public float F(int a, float b)
{return a * b;}
public int F (int a, int b)
{ return a + b;. }'
public AAA (int a, int b)
Y = b;}
3.
4
8.
6.
10 }
11 class BBB
12 {
{x = a;
públic iñt z;
public float w;
public BBB(int a, float b, int c, int d) : base (c , d)
{z = a;
13
14
15
16
W =
b; }
17
18 static void Main (string[] args)
19
AAA Obi
ВBB Obj2
new AAA(5, 6);
= new BBB (1, 2, 4, 5)B
Obj2.F(2, 5) ;
Obj2.F(2, 5.0f);
20
21
22
23
24
25 }
int R1 =
float R2
Console.Write(R2);
a) O 7
b) O 10 7
C) O Error
d) O 10
Transcribed Image Text:3- What is the expected output of that code? 1 class AAA 2. { public int X, Y; public float F(int a, float b) {return a * b;} public int F (int a, int b) { return a + b;. }' public AAA (int a, int b) Y = b;} 3. 4 8. 6. 10 } 11 class BBB 12 { {x = a; públic iñt z; public float w; public BBB(int a, float b, int c, int d) : base (c , d) {z = a; 13 14 15 16 W = b; } 17 18 static void Main (string[] args) 19 AAA Obi ВBB Obj2 new AAA(5, 6); = new BBB (1, 2, 4, 5)B Obj2.F(2, 5) ; Obj2.F(2, 5.0f); 20 21 22 23 24 25 } int R1 = float R2 Console.Write(R2); a) O 7 b) O 10 7 C) O Error d) O 10
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Fundamentals of Blockchaining
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT