Given an incomplete program in Program 2, complete the program by filling in the blanks with an appropriate Java statement to generate the output, as shown in Figure 2. Write your answer in Table 2. UTM UTM NNN 29 UTM UTM private String : private int k TM UTM 1 UTM } //Deciare class, named Flower that inherits classUTAUTM //Program 2 named Flower //2 marks TM public Flowerl (String 3) //Call superclass constructor with 2 argumente //a part of the output in Part 2 UTM TM (b) 7 buds Orchid Hello in default Flower 2 Hibiscus (s) bouquet 2 types of flowers TM 5 buds Lily Beautiful Lily this.3-57 Print in Flower2: 2 Daisy Print in base: 5 Lily Print in Flowerl: 3 Lily Figure 2 UTM public Flowerl (String j, int k) { this.- 3 this.k- k //Assign attribute k with an appropriate value //to produce a part of the output in Part 4 1/2 marks ts\n", 3); System.out.printf("Beautiful public void print () { voTM Part 1 Parts UTM Part 4 1/3 marksTMUUTM System.out.printf("dis (s) bouquet\n", k Part 2 UTM UTM UTM //Write an appropriate statement to produce //a part of the output in Part 4 (d) 1/2 marks System.out.printf("Print in Flowerl: td tain", produce UTM UTM UTM UTM 81 32 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 //Declare class named Flower2 that inherits class named Flowerl (c) //2 marks UTM 31 private String 57 private int k TN public Flower2 (int k) //Call superclass constructor with 2 arguments to produce //a part of the output in Part 1 (0) this.km //3 marks UTMUTM TM } } GTM class Flower { 93 94 95 96 97 98 99 100 101 102 103) public void System.out.printf ("Print in Flower2: ad es\n", k, j); print() { UTM (UTM UTM UTM UTM private String private int } public Flower () ( //Call another constructor with appropriate arguments //to produce a part of the output in Part 1 (b) //3 marks System.out.println("Hello in default Flower"); attribute with an appropriate value //to produce a part of the output in Part 3 1/2 marks System.out.printf(ed types of flowers\n", k) SUTHE //Write the 2 arguments constructor header with an /appropriate parameter SUT BUT BUT System.out.printf("ad buds s\n", J. k) UTM UTM } } TM TM public void print () { System.out.print in base: id ts\n", (i) this.k-k; this. TM UTM UTM UTM //3 marks class Final UTM public static void main(String [] args) { TM Flower Flower2 p: q UTMUTM (3) System.out.println(); 3. UTM UT UTM //Instantiate object named p by using an appropriate //argument to display the output in Part 1 UTM UTM (1) System.out.println(); //3 marks //Write an //output in Part 3 MO System.out.println(); //Instantiate object named q by using priate UTM //argument to display the output in Part 2 JTM UTM 8UTM AUA 1/3 marks statement to produce the //1 mark UTM 3 //Write an appropriate statement to produce the //output in Part 4 (m) //1 mark matemat MOU
Given an incomplete program in Program 2, complete the program by filling in the blanks with an appropriate Java statement to generate the output, as shown in Figure 2. Write your answer in Table 2. UTM UTM NNN 29 UTM UTM private String : private int k TM UTM 1 UTM } //Deciare class, named Flower that inherits classUTAUTM //Program 2 named Flower //2 marks TM public Flowerl (String 3) //Call superclass constructor with 2 argumente //a part of the output in Part 2 UTM TM (b) 7 buds Orchid Hello in default Flower 2 Hibiscus (s) bouquet 2 types of flowers TM 5 buds Lily Beautiful Lily this.3-57 Print in Flower2: 2 Daisy Print in base: 5 Lily Print in Flowerl: 3 Lily Figure 2 UTM public Flowerl (String j, int k) { this.- 3 this.k- k //Assign attribute k with an appropriate value //to produce a part of the output in Part 4 1/2 marks ts\n", 3); System.out.printf("Beautiful public void print () { voTM Part 1 Parts UTM Part 4 1/3 marksTMUUTM System.out.printf("dis (s) bouquet\n", k Part 2 UTM UTM UTM //Write an appropriate statement to produce //a part of the output in Part 4 (d) 1/2 marks System.out.printf("Print in Flowerl: td tain", produce UTM UTM UTM UTM 81 32 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 //Declare class named Flower2 that inherits class named Flowerl (c) //2 marks UTM 31 private String 57 private int k TN public Flower2 (int k) //Call superclass constructor with 2 arguments to produce //a part of the output in Part 1 (0) this.km //3 marks UTMUTM TM } } GTM class Flower { 93 94 95 96 97 98 99 100 101 102 103) public void System.out.printf ("Print in Flower2: ad es\n", k, j); print() { UTM (UTM UTM UTM UTM private String private int } public Flower () ( //Call another constructor with appropriate arguments //to produce a part of the output in Part 1 (b) //3 marks System.out.println("Hello in default Flower"); attribute with an appropriate value //to produce a part of the output in Part 3 1/2 marks System.out.printf(ed types of flowers\n", k) SUTHE //Write the 2 arguments constructor header with an /appropriate parameter SUT BUT BUT System.out.printf("ad buds s\n", J. k) UTM UTM } } TM TM public void print () { System.out.print in base: id ts\n", (i) this.k-k; this. TM UTM UTM UTM //3 marks class Final UTM public static void main(String [] args) { TM Flower Flower2 p: q UTMUTM (3) System.out.println(); 3. UTM UT UTM //Instantiate object named p by using an appropriate //argument to display the output in Part 1 UTM UTM (1) System.out.println(); //3 marks //Write an //output in Part 3 MO System.out.println(); //Instantiate object named q by using priate UTM //argument to display the output in Part 2 JTM UTM 8UTM AUA 1/3 marks statement to produce the //1 mark UTM 3 //Write an appropriate statement to produce the //output in Part 4 (m) //1 mark matemat MOU
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Kindly fill out the blanks labeled as letters
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 7 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY