All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer science
java software solutions
Questions and Answers of
Java Software Solutions
PP 13.8 Design and implement a program that prompts the user to enter a string and then performs two palindrome tests. The first should use a single stack to test whether the string is a palindrome.
PP 13.9 Design and implement a class named stringTree, a binary tree for storing string objects in alphabetic order. Each node in the tree should be represented by a Node class, which stores the
SR 9.1 Describe the relationship between a parent class and a child class.
SR 9.2 How does inheritance support software reuse?
SR 9.3 What relationship should every class derivation represent?
SR 9.4 What does the protected modifier accomplish?
SR 9.5 Why is the super reference important to a child class?
SR 9.6 Define a class schoolBook2 that extends Book2 to include an attribute indicating the age (4 through 16) that a book targets. The constructor accepts the age as a parameter. The class also
SR 9.7 What is the difference between single inheritance and multiple inheritance?
SR 9.8 Why would a child class override one or more of the methods of its parent class?
SR 9.9 True or False? Explain. a. A child class may define a method with the same name as a method in the parent class. b. A child class can override the constructor of the parent class. c. A child
SR 9.10 Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of food. Show some appropriate variables and method names for at least two of these
SR 9.11 What is the significance of the object class?
SR 9.12 Which is the only Java class that does not have a parent class? Explain.
SR 9.13 What is the role of an abstract class?
SR 9.14 Why is it a contradiction to define a final, abstract class?
SR 9.15 What is an interface hierarchy?
SR 9.16 Are all members of a parent class inherited by the child? Explain.
SR 9.17 Could the Pizza class refer to the variable servings explicitly? What about the calories method? Explain.
SR 9.18 What does it mean for an inheritance derivation to represent an is-a relationship?
SR 9.19 Where should common features of classes appear in a class hierarchy? Why?
SR 9.20 How can you define a class with multiple roles?
SR 9.21 Why should you override the tostring method of a parent in its child class, even when the method is not invoked through the child by your current applications?
SR 9.22 How can the final modifier be used to restrict inheritance? Why would you do this?
SR 9.23 What is the purpose of the shape class?
SR 9.24 Describe the inheritance relationship between a Node and an Ellipse.
SR 9.25 Describe the inheritance relationship between a Node and a Label.
SR 9.26 Which nodes can serve as root nodes of a scene?
SR 9.27 What are some ways a color picker allows the user to specify a color?
SR 9.28 What does the getvalue method of a DatePicker object return? What does the getvalue method of a ColorPicker object return?
SR 9.29 What is a dialog box?
SR 9.30 What classes can be used to create and display dialog boxes?
SR 9.31 What is a file chooser?
EX 9.1 Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of clocks. Show the variables and method names for two of these classes.
EX 9.2 Show an alternative diagram for the hierarchy in Exercise 9.1. Explain why it may be a better or worse approach than the original.
EX 9.3 Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of cars, organized first by manufacturer. Show some appropriate variables and method
EX 9.4 Show an alternative diagram for the hierarchy in Exercise 9.3 in which the cars are organized first by type (sports car, sedan, SUV, etc.). Show some appropriate variables and method names for
EX 9.5 Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of airplanes. Show some appropriate variables and method names for at least two of
EX 9.6 Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of trees (oak, elm, etc.). Show some appropriate variables and method names for at
EX 9.7 Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of payment transactions at a store (cash, credit card, etc.). Show some appropriate
EX 9.8 Experiment with a simple derivation relationship between two classes. Put println statements in constructors of both the parent and child classes. Do not explicitly call the constructor of the
EX 9.9 Which of the following classes can be used as the root node of a scene in a JavaFX application? What is the determining factor? a. GridPane b. Rectangle C. Group d. Button e. ImageView
EX 9.10 Describe the role of the Alert class.
PP 9.1 Write a class called MonetaryCoin that is derived from the coin class presented in Chapter 5. Store an integer in the MonetaryCoin that represents its value and add a method that returns its
PP 9.2 Design and implement a set of classes that define the employees of a hospital: doctor, nurse, administrator, surgeon, receptionist, janitor, and so on. Include methods in each class that are
PP 9.3 Design and implement a set of classes that define various types of reading material: books, novels, magazines, technical journals, textbooks, and so on. Include data values that describe
PP 9.4 Design and implement a set of classes that keeps track of various sports statistics. Have each low-level class represent
PP 9.5 Design and implement a set of classes that keeps track of demographic information about a set of people, such as age, nationality, occupation, income, and so on. Design each class to focus on
PP 9.6 Design and implement a set of classes that define a series of three-dimensional geometric shapes (these are not like JavaFX classes and have no graphic representation). For each, store
PP 9.7 Design and implement a set of classes that define various types of electronics equipment (computers, cell phones, pagers, digital cameras, etc.). Include data values that describe various
PP 9.8 Design and implement a set of classes that define various courses in your curriculum. Include information about each course such as the title, number, description, and department that teaches
PP 9.9 Write a JavaFX application that displays a text field, a color picker, and a button. When the user presses the button, or presses return while in the text field, display the text obtained.
PP 9.10 Modify the RubberLines program from Chapter 7 so that a color picker is displayed in the upper left corner of the window. Let the value of the color picker determine the color of the next
PP 9.11 Write a JavaFX application that allows the user to draw (scribble) on the scene by dragging the mouse. In the upper-left corner, provide a button to clear the scene and a color picker to
PP 10.1 Modify the Firm example from this chapter such that it accomplishes its polymorphism using an interface called Payable.
PP 10.2 Modify the Firm example from this chapter such that all employees can be given different vacation options depending on their classification. Provide a method called vacation that returns the
PP 10.3 Implement the speaker interface described in Section 10.3, and create three classes that implement speaker in
PP 10.4 Rewrite the sorting class so that both sorting algorithms put the values in descending order. Create a driver class with a main method to exercise the modifications.
PP 10.5 Modify the Movies program from Chapter 8 so that it keeps the DVDs sorted by title.
PP 10.6 Create a new version of the Ellipse Sliders program from this chapter that uses change listeners instead of property binding to achieve the same functionality.
PP 10.7 Create a new version of the spinner Demo program from this chapter that uses change listeners instead of property binding to achieve the same functionality.
PP 10.8 Write a JavaFX application that displays a Text object and a slider that controls the font size of the text.
PP 10.9 Create a new version of the QuoteOptions program from Chapter 5 that uses a spinner to pick the quote category rather than a set of radio buttons.
EX 10.1 Draw and annotate a class hierarchy that represents various types of faculty at a university. Show what characteristics would be represented in the various classes of the hierarchy. Explain
EX 10.2 Draw and annotate a class hierarchy that represents various types of animals in a zoo. Show what characteristics would be represented in the various classes of the hierarchy. Explain how
EX 10.3 Draw and annotate a class hierarchy that represents various types of sales transactions in a store (cash, credit, etc.). Show what characteristics would be represented in the various classes
EX 10.4 What would happen if the pay method were not defined as an abstract method in the Staff Member class of the Firm program?
EX 10.5 Describe a property binding that you could set up other than the examples used in this chapter.
EX 10.6 Write a statement that would bind the property representing the radius of a circle object to the property representing the value in a slider.
SR 10.1 What is polymorphism?
SR 10.2 Why is compile time binding considered more efficient than dynamic binding?
SR 10.3 How does inheritance support polymorphism?
SR 10.4 Suppose the class Music Player is the parent of the class CDPlayer. Is the following sequence of statements allowed in Java? Explain. Music Player mplayer new MusicPlayer(); CDPlayer caplayer
SR 10.5 Suppose the class Music Player is the parent of the class CDPlayer. Is the following sequence of statements allowed in Java? Explain. Music Player mplayer = new MusicPlayer(); CDPlayer
SR 10.6 How is overriding related to polymorphism?
SR 10.7 Why is the Staff Member class in the Firm example declared as abstract?
SR 10.8 Why is the pay method declared in the staff Member class, given that it is abstract and has no body at that level?
SR 10.9 Which pay method is invoked by the following line from the payday method of the staff class? amount = staffList [count].pay();
SR 10.10 How can polymorphism be accomplished using interfaces?
SR 10.11 Suppose that the speaker interface and the Philosopher and Dog classes are as described in this section. Are the following sequences of statements allowed in Java? Explain. a. Speaker
SR 10.12 Describe the comparable interface.
SR 10.13 Show the sequence of changes the selection sort algorithm makes to the following list of numbers: 57 18 243
SR 10.14 Show the sequence of changes the insertion sort algorithm makes to the following list of numbers: 57 18 243
SR 10.15 In what way are the sort methods defined in this chapter polymorphic?
SR 10.16 Which is better: selection sort or insertion sort? Explain.
SR 10.17 Given the following list of numbers, how many elements of the list would be examined by the linear search algorithm to determine if each of the indicated target elements are on the list? 15
SR 10.18 Describe the general concept of a binary search.
SR 10.19 Given the following list of numbers, how many elements of the list would be examined by the binary search algorithm to determine if each of the indicated target elements are on the list? 14
SR 10.20 Suppose you are designing classes for a banking- related system. Both checking accounts and savings accounts require deposit and withdraw operations. You decide to provide these behaviors
SR 10.21 Suppose you are designing classes to help create aquarium-based screen savers. At times, you will want some aquarium objects to "float" from wherever they are to the top of
SR 10.22 Suppose you are designing classes to support the modeling of rain forest environments. Animal objects, such as butterflies and monkeys, need to grow older periodically. You decide to provide
SR 10.23 What is a JavaFX property?
SR 10.24 What is the result of property binding?
SR 10.25 How do you perform mathematical operations on numeric properties?
SR 10.26 What is a change listener?
SR 10.27 What does a slider allow the user to do?
SR 10.28 How do you access the value that a slider represents?
SR 10.29 How does the user interact with a spinner?
SR 10.30 Why might a program designer opt to use a spinner rather than a choice box?
SR 10.31 What is a spinner value factory?
Showing 100 - 200
of 978
1
2
3
4
5
6
7
8
9
10