Discover
Questions library
Collections library
Find online teacher
login
Discover
questions library
Find online teacher
login
Popular searches:
class-diagram
Polymorphism
flowchart
if-else
Home
Questions
Questions
Study lists
Ashoor Questions
555 Questions
(Display three cards) Write a program that displays three cards randomly selected from a deck of 52, as shown in Figure 14.43c. The card image files are named 1.png, 2.png, …, 52.png and stored in the image/card directory
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
272
(Tic-tac-toe board) Write a program that displays a tic-tac-toe board, as shown in Figure 14.43b. A cell may be X, O, or empty. What to display at each cell is randomly decided. The X and O are images in the files x.gif and o.gif
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
110
(Display images) Write a program that displays four images in a grid pane, as shown in Figure 14.43a
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
209
(Algebra: vertex form equations) The equation of a parabola can be expressed in either standard form (y = ax2 + bx + c) or vertex form (y = a(x - h)2 + k). Write a program that prompts the user to enter a, b, and c as integers in standard form and displays h and k in the vertex form. Here are some s
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
124
(Algebra: solve quadratic equations) Rewrite Programming Exercise 3.1 to obtain imaginary roots if the determinant is less than 0 using the Complex class in Programming Exercise 13.17. Here are some sample runs
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
99
(Convert decimals to fractions) Write a program that prompts the user to enter a decimal number and displays the number in a fraction. Hint: read the decimal number as a string, extract the integer part and fractional part from the string,
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
137
(Use the Rational class) Write a program that computes the following summation series using the Rational class:
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
80
(Math: The Complex class) A complex number is a number in the form a + bi, where a and b are real numbers and i is 2-1. The numbers a and b are known as the real part and imaginary part of the complex number, respectively. You can perform addition, subtraction, multiplication, and division for compl
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
191
(Create a rational-number calculator) Write a program similar to Listing 7.9, Calculator.java. Instead of using integers, use rationals, as shown in Figure 13.10a. You will need to use the split method in the String class,
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
85
(Use BigInteger for the Rational class) Redesign and implement the Rational class in Listing 13.13 using BigInteger for the numerator and denominator
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
105
(Demonstrate the benefits of encapsulation) Rewrite the Rational class in Listing 13.13 using a new internal representation for the numerator and denominator. Create an array of two integers as follows:
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
72
(Enable the Course class cloneable) Rewrite the Course class in Listing 10.6 to add a clone method to perform a deep copy on the students field
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
80
(Sum the areas of geometric objects) Write a method that sums the areas of all the geometric objects in an array. The method signature is
Java programming
2022-06-05
Answers
30
Question
40
Followers
30
0
1
147
Total:
555
Previous
1
2
3
4
5
Next
Go