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
Ashoor Questions
555 Questions
(Game: pick a card) Write a program that simulates picking a card from a deck of 52 cards. Your program should display the rank (Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King) and suit (Clubs, Diamonds, Hearts, Spades) of the card. Here is a sample run of the program:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
246
(Geometry: point in a rectangle?) Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the rectangle centered at (0, 0) with width 10 and height 5
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
433
(Geometry: point in a circle?) Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the circle centered at (0, 0) with radius 10. For example, (4, 5) is inside the circle and (9, 9) is outside the circle, as shown in Figure 3.7a
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
310
(Science: day of the week) Zeller’s congruence is an algorithm developed by Christian Zeller to calculate the day of the week. The formula is
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
492
(Science: wind-chill temperature) Programming Exercise 2.17 gives a formula to compute the wind-chill temperature. The formula is valid for temperatures in the range between −58ºF and 41ºF and wind speed greater than or equal to 2
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
257
(Compute the perimeter of a triangle) Write a program that reads three edges for a triangle and computes the perimeter if the input is valid. Otherwise, display that the input is invalid. The input is valid if the sum of every pair of two edges is greater than the remaining edge
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
250
(Cost of shipping) A shipping company uses the following function to calculate the cost (in dollars) of shipping based on the weight of the package (in pounds)
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
248
(Game: scissor, rock, paper) Write a program that plays the popular scissor-rockpaper game
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
265
(Random point) Write a program that displays a random coordinate in a rectangle. The rectangle is centered at (0, 0) with width 100 and height 200
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
2
298
(Game: lottery) Revise Listing 3.8, Lottery.java, to generate a lottery of a threedigit number. The program prompts the user to enter a three-digit number and determines whether the user wins according to the following rules:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
284
(Game: heads or tails) Write a program that lets the user guess whether the flip of a coin results in heads or tails. The program randomly generates an integer 0 or 1, which represents head or tail. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
539
(Financial application: compute taxes) Listing 3.5, ComputeTax.java, gives the source code to compute taxes for single filers. Complete Listing 3.5 to compute the taxes for all filing statuses
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
297
(Palindrome number) Write a program that prompts the user to enter a three-digit integer and determines whether it is a palindrome number. A number is palindrome if it reads the same from right to left and from left to right. Here is a sample run of this program:
Java programming
2022-06-03
Answers
30
Question
40
Followers
30
0
1
379
Total:
555
Previous
25
26
27
28
29
Next
Go