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
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
java software solutions
Questions and Answers of
Java Software Solutions
PP 6.5 Using the pairofDice class from PP 4.9, write a program that rolls a pair of dice 1000 times, counting the number of box cars (two sixes) that occur.
PP 6.6 Using the coin class defined in Chapter 5, write a program called count Flips whose main method flips a coin 100 times and counts how many times each side comes up. Print the results.
PP 6.7 Create modified versions of the stars program to print the following patterns. Create a separate program to produce each pattern. Hint: Parts b, c, and d require several loops, some of which
PP 6.8 Write a program that prints a table showing a subset of the Unicode characters and their numeric values. Print five number/character pairs per line, separated by tab characters. Print the
PP 6.9 Write a program that reads a string from the user, then determines and prints how many of each lowercase vowel (a, e, i, o, and u) appear in the entire string. Have a separate counter for each
PP 6.10 Write a program that prints the verses of the song "The Twelve Days of Christmas," in which each verse adds one line. The first two verses of the song are: On the 1st day of Christmas my true
PP 6.12 Write a JavaFX application that displays an 8*8 checkerboard with 64 squares, alternating black and white.
PP 6.13 Write a JavaFX application that draws 10 concentric circles of random radius.
PP 6.14 Write a JavaFX application that draws 100 circles of random color and random size in random locations. Ensure that the entire circle appears in the visible area of the scene.
PP 6.15 Write a JavaFX application that displays 10,000 very small circles (radius of 1 pixel) in random locations within the visible area. Fill the dots on the left half of the scene red and the
PP 6.16 Write a JavaFX application that displays a brick wall pattern in which each row of bricks is offset from the row above and below it.
PP 6.17 Write a JavaFX application called Quilt that displays a quilt made up of two alternating square patterns. Define a class called Quiltsquare that represents a pattern of your choice. Allow the
PP 6.18 Write a JavaFX application that draws 10 circles of random radius in random locations. Leave all circles unfilled except for the largest circle, which should be filled with a translucent red
PP 6.19 Write a JavaFX application that displays the same square image four times, once right side up, then on its right side, then upside down, and finally, on its left side.
PP 6.20 Write a JavaFX application that displays a series of ellipses with the same center point. Each one should be slightly rotated, creating a pinwheel effect. Use a loop to create the shapes.
PP 6.21 Write a JavaFX application that displays a group of four alien spaceships in space. Define the spaceship once in a separate class, made up of whatever shapes you'd like. Then create four of
Establish key issues related to the design of object-oriented software.
Explore techniques for identifying the classes and objects needed in a program.
Discuss the relationships among classes.
Describe the effect of the static modifier on methods and data.
Discuss the creation of a formal object interface.
Further explore the definition of enumerated type classes.
Discuss issues related to the design of methods, including method overloading.
Explore issues related to the design of graphical user interfaces.
Discuss events generated by the mouse and the keyboard.
SR 7.1 Name the four basic activities that are involved in a software development process.
SR 7.2 Who creates/specifies software requirements, the client or the developer? Discuss.
SR 7.3 Compare and contrast the four basic development activities presented in this section with the five general problem-solving steps presented in Chapter 1 (Section 1.6).
SR 7.4 How can identifying the nouns in a problem specification help you design an object-oriented solution to the problem?
SR 7.5 Is it important to identify and define all of the methods that a class will contain during the early stages of problem solution design? Discuss.
SR 7.6 What is the difference between a static variable and an instance variable?
SR 7.7 Assume you are defining a BankAccount class whose objects each represent a separate bank account. Write a declaration for a variable of the class that will hold the combined total balance of
SR 7.8 Assume you are defining a Bank Account class whose objects each represent a separate bank account. Write a declaration for a variable of the class that will hold the minimum balance that each
SR 7.9 What kinds of variables can the main method of any program reference? Why?
SR 7.10 Describe a dependency relationship between two classes.
SR 7.11 Explain how a class can have an association with itself.
SR 7.12 What is an aggregate object?
SR 7.13 What does the this reference refer to?
SR 7.14 What is the difference between a class and an interface?
SR 7.15 Define a Java interface called Nameable. Classes that implement this interface must provide a setName method that requires a single string parameter and returns nothing, and a getName method
SR 7.16 True or False? Explain. a. A Java interface can include only abstract methods, nothing else. b. An abstract method is a method that does not have an implementation. c. All of the methods
SR 7.17 Using the enumerated type season as defined in this section, what is the output from the following code sequence? Season timel, time2; timel = Season.winter; time2 = Season.summer;
SR 7.18 What is method decomposition?
SR 7.19 Answer the following questions about the PigLatinTranslator class. a. No constructor is defined. Why not? b. Some of the defined methods are private. Why? C. A Scanner object is declared in
SR 7.20 Identify the resultant sequence of calls/returns of PigLatinTranslator support methods when translate is invoked with the following actual parameters. a. "animal" b. "hello" C. "We are the
SR 7.21 How are objects passed as parameters?
SR 7.22 How are overloaded methods distinguished from each other?
SR 7.23 For each of the following pairs of method headers, state whether or not the signatures are distinct. If not, explain why not. a. String describe (String name, int count) String describe (int
SR 7.24 The Num class is defined in Section 7.7. Overload the constructor of that class by defining a second constructor which takes no parameters and sets the value attribute to zero.
SR 4.16 Why is a method invoked through (or on) a particular object? What is the exception to that rule?
SR 4.17 What does it mean for a method to return a value?
SR 4.18 What does the return statement do?
SR 4.19 Is a return statement required?
SR 4.20 Explain the difference between an actual parameter and a formal parameter.
SR 4.21 Write a method called get Face Down for the Die class that returns the current "face down" value of the die. Hint: On a standard die, the sum of any two opposite faces is seven.
SR 4.22 In the Transactions program: a. How many Account objects are created? b. How many arguments (actual parameters) are passed to the withdraw method when it is invoked on the acct2 object? c.
SR 4.23 Which of the Account class methods would you classify as accessor methods? As mutator methods? As service methods?
SR 4.24 What are constructors used for?
SR 4.25 How are constructors defined?
SR 4.26 What is the relationship between an ellipse and an arc?
SR 4.27 Which type of arc is used to display a "pie" shape? A simple curve?
SR 4.28 What start angle and arc length would you specify to include the complete bottom half of the underlying ellipse? What alternative values could you use?
SR 4.29 What is the difference between an Image and an ImageView?
SR 4.30 What is a layout pane?
SR 4.31 How are style properties set for JavaFX nodes?
SR 4.32 What is the relationship among GUI controls, events, and event handlers?
SR 4.33 What type of event does a Button object generate when it is pushed?
SR 4.34 Summarize the three techniques for defining a JavaFX event handler.
SR 4.35 What is a FlowPane?
SR 4.36 Describe what happens in the Fahrenheit Converter program when a user types a number into the text field and presses Return.
SR 4.37 How are rows and columns numbered in a GridPane layout? How would you specify the cell that is three over and two down from the upper left corner?
EX 4.1 For each of the following pairs, which represents a class and which represents an object of that class? a. Superhero, Superman b. Justin, Person c. Rover, Pet d. Magazine, Time e. Christmas,
EX 4.2 List some attributes and operations that might be defined for a class called Picture Frame that represents a picture frame.
EX 4.3 List some attributes and operations that might be defined for a class called Meeting that represents a business meeting.
EX 4.4 List some attributes and operations that might be defined for a class called course that represents a college course (not a particular offering of a course, just the course in general).
EX 4.5 Write a method called lyrics that prints the lyrics of a song when invoked. The method should accept no parameters and return no value.
EX 4.6 Write a method called cube that accepts one integer parameter and returns that value raised to the third power.
EX 4.7 Write a method called random100 that returns a random integer in the range of 1 to 100 (inclusive).
EX 4.8 Write a method called randomInRange that accepts two integer parameters representing a range. The method should return a random integer in the specified range (inclusive). Assume that the
EX 4.9 Write a method called randomColor that creates and returns a color object that represents a random color. Recall that a color object can be defined by three integer values between 0 and 255,
EX 4.10 Suppose you have a class called Movie. Write a constructor for the class that initializes the title and director instance variables based on parameters passed to the constructor.
EX 4.11 Suppose you have a class called child with an instance data value called age. Write a getter method and a setter method for age.
EX 4.12 Draw a UML class diagram that shows the relationships among the classes used in the Transactions program.
EX 4.13 Write a declaration that creates an Arc object that is centered at point (50, 50) and sweeps across the top half of the underlying ellipse. Base it on an ellipse with a horizontal radius of
EX 4.14 How do you restrict the pixels displayed of an image?
EX 4.15 What is the purpose of a layout pane?
EX 4.16 How can a method reference be used to define an event handler?
PP 4.1 Write a class called Counter that represents a simple tally counter, which might be used to count people as they enter a room. The counter class should contain a single integer as instance
PP 4.2 Write a class called Bulb that represents a light bulb that can be turned on and off. Create a driver class called Lights whose main method instantiates and turns on some Bulb objects.
PP 4.3 Write a class called sphere that contains instance data that represents the sphere's diameter. Define the sphere constructor to accept and initialize the diameter, and include getter and
PP 4.4 Write a class called Dog that contains instance data that represents the dog's name and age. Define the Dog constructor to accept and initialize instance data. Include getter and setter
PP 4.5 Write a class called car that contains instance data that represents the make, model, and year of the car. Define the Car constructor to initialize these values. Include getter and setter
PP 4.6 Write a class called Box that contains instance data that represents the height, width, and depth of the box. Also include a boolean variable called full as instance data that represents
PP 4.7 Write a class called Book that contains instance data for the title, author, publisher, and copyright date. Define the Book constructor to accept and initialize this data. Include setter and
PP 4.8 Write a class called Flight that represents an airline flight. It should contain instance data that represents the airline name, flight number, and the flight's origin and destination cities.
PP 4.9 Using the Die class defined in this chapter, write a class called PairofDice, composed of two Die objects. Include methods to set and get the individual die values, a method to roll the dice,
PP 4.10 Write a JavaFX application that displays three images side by side. Use a FlowPane with appropriate spacing between images.
PP 4.11 Write a JavaFX application that displays an image next to another version of that image using a viewport to restrict the visual area displayed in some appropriate way.
PP 4.12 Write a JavaFX application that displays a button and a number. Every time the button is pushed, change the number to a random value between 1 and 100.
PP 4.13 Write a JavaFX application that presents a button and a circle. Every time the button is pushed, the circle should be moved to a new random location within the window.
Showing 400 - 500
of 978
1
2
3
4
5
6
7
8
9
10