Discover
Questions library
Collections library
Find online teacher
login
Discover
questions library
Find online teacher
login
Popular searches:
if-else
class-diagram
flowchart
Polymorphism
Home
Questions
Questions
Study lists
Asmaamasry Questions
705 Questions
(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
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
237
(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
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
239
(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.)
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
171
(Occurrences of a specified character in an array) Write a recursive method that finds the number of occurrences of a specified character in an array. You need to define the following two methods. The second one is a recursive helper method
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
171
(Find the number of uppercase letters in an array) Write a recursive method to return the number of uppercase letters in an array of characters. You need to define the following two methods. The second one is a recursive helper method
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
307
(Occurrences of a specified character in a string) Rewrite Programming Exercise 18.10 using a helper method to pass the substring high index to the method. The helper method header is:
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
174
(Find the number of uppercase letters in a string) Write a recursive method to return the number of uppercase letters in a string. Write a test program that prompts the user to enter a string and displays the number of uppercase letters in the string
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
211
(Find the largest number in an array) Write a recursive method that returns the largest integer in an array. Write a test program that prompts the user to enter a list of eight integers and displays the largest element
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
320
(Print the characters in a string reversely) Rewrite Programming Exercise 18.9 using a helper method to pass the substring high index to the method. The helper method header is: public static void reverseDisplay(String value, int high)
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
210
(Occurrences of a specified character in a string) Write a recursive method that finds the number of occurrences of a specified letter in a string using the following method heade
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
2
246
(Sum the digits in an integer using recursion) Write a recursive method that computes the sum of the digits in an integer. Use the following method header:
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
244
Print the digits in an integer reversely) Write a recursive method that displays an int value reversely on the console using the following header:
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
173
(Fibonacci series) Modify Listing 18.2, ComputeFibonacci.java, so that the program finds the number of times the fib method is called. (Hint: Use a static variable and increment it every time the method is called.)
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
127
Total:
705
Previous
45
46
47
48
49
Next
Go