Discover
Questions library
Collections library
Find online teacher
login
Discover
questions library
Find online teacher
login
Introduction to Java Programming, Comprehensive Version (10th Edition)
by
Y. Danial liang
Edition:
10th edition
ISBN13:
978-0133761313
ISBN10:
0133761312
772
Java programming
Home
Books
Introduction to Java Programming, Comprehensive Version (10th Edition)
Similar Books
No books found
Title
Chapter: 18 /
Q: 18
(Tower of Hanoi) Modify Listing 18.8, TowerOfHanoi.java, so that the program finds the number of moves needed to move n disks from tower A to tower B. (Hint: Use a static variable and increment it every time the method is called.)
Chapter: 18 /
Q: 19
(Sierpinski triangle) Revise Listing 18.9 to develop a program that lets the user use the + and – buttons to increase or decrease the current order by 1, as shown in Figure 18.12a. The initial order is 0. If the current order is 0, the Decrease button is ignored
Chapter: 18 /
Q: 20
(Display circles) Write a Java program that displays ovals, as shown in Figure 18.12b. The circles are centered in the pane. The gap between two adjacent circles is 10 pixels, and the gap between the border of the pane and the largest circle is also 10
Chapter: 18 /
Q: 21
(Decimal to binary) Write a recursive method that converts a decimal number into a binary number as a string. The method header is:
Chapter: 18 /
Q: 22
(Decimal to hex) Write a recursive method that converts a decimal number into a hex number as a string. The method header is:
Chapter: 18 /
Q: 23
(Binary to decimal) Write a recursive method that parses a binary number as a string into a decimal integer. The method header is:
Chapter: 18 /
Q: 24
(Hex to decimal) Write a recursive method that parses a hex number as a string into a decimal integer. The method header is:
Chapter: 18 /
Q: 25
(String permutation) Write a recursive method to print all the permutations of a string. For example, for the string abc, the permuation is
Chapter: 18 /
Q: 26
(Create a maze) Write a program that will find a path in a maze, as shown in Figure 18.13a. The maze is represented by an 8 * 8 board. The path must meet the following conditions:
Chapter: 18 /
Q: 27
(Koch snowflake fractal) The text presented the Sierpinski triangle fractal. In this exercise, you will write a program to display another fractal, called the Koch snowflake, named after a famous Swedish mathematician. A Koch snowflake is created as follows:
total questions:
772
Previous
49
50
51
52
53
Next
Questions
772
Views
Best Answers
299
Points
5
×
Close
add reason
reason