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

4948 until your se3sion times out! Enrollment: Add Classes My Grades CS121-resou

ID: 3581484 • Letter: 4

Question

4948 until your se3sion times out! Enrollment: Add Classes My Grades CS121-resources sample-final pct Welcome, abdullah Blackboard d. Consider the following declaration: 10 JPanel keypadPanel new JPane keypad Panel .setLayout (new GridLayout (4,4)); JButton CJ0 buttons new JButton [4] C4]; for (int i 0; i buttons.length; i++) for (int j 0; j k buttons Til length; j++) new JButton (i j) keypad Panel add (buttons Cil Cj]); What is the label on the button on the bottom-left corner? (i) 0,0 (ii) 0,3 (iii) 3,0 (iv) 33 2. (40 points) Short Answer Questions a. What combination of JPanels and LayoutManagers would you use to create the GUI shown below? ccp 259 boise state Google Search

Explanation / Answer

2) a) a. What combination of JPanelas and LayoutManagers would you use to create the GUI shown below?
Suppose we want to create a variable to store the number of students in a class.The number of students can change whilke the program is running which of the following would be the most appropriate variable declaration for this?

Answer) Option iv) final int NUM_STUDENTS;

b. What is the output of the following statement ?

System.out.println("Next year , my dog will be " + 2 + 1 + " years old.");

Answer: Option iv) Next year , my dog will be 21 years old.

c) What output is produced by the following statement ?

int num1=22;
int num2=10;
double result=(double) (num1/num2);
System.out.println(result);

Output: Option (i) 2.0

d. Consider the following declaration

JPanel keyPanel=new JPanel();
keeypadPanel.setLayout(new GridLayout(4,4));
JButton [][] buttons=new JButton[4[4];
for(int i=0;i<buttons.length;i++)
{
for(int j=0;j<buttons[i].length;j++)
{
button[i][j]=new JButton(i+","+j);
keypadPanel.add(buttons[i][j]);
}

what is the label on the bottom-left corner?

Answer: Option : ii) 0,3

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