Question

Topic: JAVA 18) Abstract methods are used when defining A) interface classes B) derived classes C)...

Topic: JAVA

18) Abstract methods are used when defining

A) interface classes

B) derived classes

C) classes that have no constructor

D) arrays

E) classes that have no methods

32) Which of the following GUI classes requires that it have a LayoutManager before any GUI components are added to it?

A) JButton

B) JSlider

C) JPanel

D) JFrame

E) both C and D but not A or B

33) In using the BoxLayout, adding space between components in a container can be accomplished by

A) including TabbedPanes

B) including JButtons that have no names and thus will appear invisible

C) adding invisible components

D) inserting IconImages of blank images

E) any of the above

34) In order to display three components vertically in a container, you could use all but which of the following layout managers?

A) FlowLayout

B) BoxLayout

C) GridLayout

D) BorderLayout

E) you could use any of the above

35) What is wrong with the following message to create a BoxLayout for the JPanel jp?

      jp.setLayout(new BoxLayout(BoxLayout.X_AXIS));

A) X_AXIS is not a valid constant for BoxLayout, it should instead be HORIZONTAL

B) Aside from X_AXIS, the constructor also requires a Dimension to determine the size of the Box

C) Aside from X_AXIS, the constructor also needs a command regarding horizontal glue as in createHorizontalGlue( )

D) The BoxLayout constructor is lacking a reference to the container that the BoxLayout manager will govern

E) There is nothing wrong with it at all

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Topic: JAVA 18) Abstract methods are used when defining A) interface classes B) derived classes C)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • i want answers please ??? Answers to Self-Review Exercises 625 14.3 d) In a BorderLayout, two...

    i want answers please ??? Answers to Self-Review Exercises 625 14.3 d) In a BorderLayout, two buttons added to the NORTH region will be placed side by side. e) A maximum of five components can be added to a BorderLayout ) Inner classes are not allowed to access the members of the enclosing class. B) A TextArea's text is always read-only. h) Class TextArea is a direct subclass of class Component. Find the error(s) in each of the following statements,...

  • True/False Question 1. A Linked List will have no limited size. You may add or insert...

    True/False Question 1. A Linked List will have no limited size. You may add or insert as many elements as needed. True False 2. Linked List search is a linear search. Therefore it will be slow. True False 3. A JPanel can contain zero or more JPanels. True False 4. Users can interact with JLabel component. True False 5. This code is to add a panel to the south region of a JFrame JPanel panel = new JPanel (); frame.add...

  • In this lab you will work with abstract classes/interfaces. (Java Program) You will be implementing a...

    In this lab you will work with abstract classes/interfaces. (Java Program) You will be implementing a basic employee schema within a company. The Employee class will be an abstract class that will contain methods applicable to all employees. You will then create 2 classes called SoftwareEngineer and ProductManager. Both are different employee types based on occupation. You will create an interface called Developer which will consist of specific methods that apply to only Developers (e.g. SoftwareEngineer class will implement this,...

  • Lab Assignment : In this lab, you are going to implement QueueADT interface that defines a...

    Lab Assignment : In this lab, you are going to implement QueueADT interface that defines a queue. Then you are going to use the queue to store animals. 1. Write a LinkedQueue class that implements the QueueADT.java interface using links. 2. Textbook implementation uses a count variable to keep track of the elements in the queue. Don't use variable count in your implementation (points will be deducted if you use instance variable count). You may use a local integer variable...

  • Java Painter Class This is the class that will contain main. Main will create a new...

    Java Painter Class This is the class that will contain main. Main will create a new Painter object - and this is the only thing it will do. Most of the work is done in Painter’s constructor. The Painter class should extend JFrame in its constructor.  Recall that you will want to set its size and the default close operation. You will also want to create an overall holder JPanel to add the various components to. It is this JPanel that...

  • Some java questions: 18. Consider the following class definitions public class TestAB public static void main (String a...

    Some java questions: 18. Consider the following class definitions public class TestAB public static void main (String args) A bl new B() в ь2 -new B() ; b1.х, А.у, Ь2.х, в.у); System.out.printf ("%d, Sd, %d, d\n", class A public int x = 2; public static int y = 4; public A () ( X=y- class Bextends A public int x = 32; public static int y = 45; public B ( x ++y What is the result of attempting to...

  • Lab 1.java only Goal: This lab will give you experience with defining and using classes and...

    Lab 1.java only Goal: This lab will give you experience with defining and using classes and fields, and with conditionals and recursive functions. Getting Started --------------- Read the Fraction.java class into a text editor and compile it filling in the command javac -g Fraction.java. The program should compile without errors. In a shell window, run the program using "java Fraction". The program should run, although it will print fractions in a non-reduced form, like 12/20. Part I: Constructors (1 point)...

  • JAVA Hello I am trying to add a menu to my Java code if someone can...

    JAVA Hello I am trying to add a menu to my Java code if someone can help me I would really appreacite it thank you. I found a java menu code but I dont know how to incorporate it to my code this is the java menu code that i found. import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JRadioButtonMenuItem; public class MenuExp extends JFrame { public MenuExp() { setTitle("Menu Example");...

  • /** * File: GradeCalculator . java * Description: Instances of this class are used to calculate...

    /** * File: GradeCalculator . java * Description: Instances of this class are used to calculate * a course average and a letter grade. In order to calculate * the average and the letter grade, a GradeCalculator must store * two essential pieces of data: the number of grades and the sum * of the grades. Therefore these are declared as object properties * (instance variables). * Each time calcAverage (grade) is called, a new grade is added to *...

  • In java language here is my code so far! i only need help with the extra...

    In java language here is my code so far! i only need help with the extra credit part For this project, you will create a Rock, Paper, Scissors game. Write a GUI program that allows a user to play Rock, Paper, Scissors against the computer. If you’re not familiar with Rock, Paper, Scissors, check out the Wikipedia page: http://en.wikipedia.org/wiki/Rock-paper-scissors This is how the program works: The user clicks a button to make their move (rock, paper, or scissors). The program...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT