Question
(a) Write a java program to create a string array which accepts any number of student names using Scanner() method, then print the length of
(a) Write a java program to create a string array which accepts any number of student names using Scanner() method, then print the length of each given name, as shown in Figure 2.
Figure 2: Sample output
(15 marks)
(b) Write a Java program to create a simple java GUI of size (200x150 pixel). The GUI should contain TWO (2) panels, namely Panel_1 and Panel_2. Panel_1 should be with yellow background and contains TWO (2) buttons, named as Button1 and Button2, and Panel_2 should be with blue background and contains TWO (2) buttons, named as Button3 and Button4.
(10 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started