Similar Books


    No books found

Title
Chapter: 11 / Q: 15
(Area of a convex polygon) A polygon is convex if it contains any line segments that connects two points of the polygon. Write a program that prompts the user to enter the number of points in a convex polygon, then enter the points clockwise, and display the area of the polygon. Here is a sample run
Chapter: 11 / Q: 16
(Addition quiz) Rewrite Listing 5.1 RepeatAdditionQuiz.java to alert the user if an answer is entered again. Hint: use an array list to store answers. Here is a sample run:
Chapter: 11 / Q: 17
(Algebra: perfect square) Write a program that prompts the user to enter an integer m and find the smallest integer n such that m * n is a perfect square. (Hint: Store all smallest factors of m into an array list. n is the product of the factors that appear an odd number of times in the array list
Chapter: 12 / Q: 1
(NumberFormatException) Listing 7.9, Calculator.java, is a simple commandline calculator
Chapter: 12 / Q: 2
(InputMismatchException) Write a program that prompts the user to read two integers and displays their sum. Your program should prompt the user to read the number again if the input is incorrect
Chapter: 12 / Q: 3
(ArrayIndexOutOfBoundsException) Write a program that meets the following requirements:
Chapter: 12 / Q: 4
(IllegalArgumentException) Modify the Loan class in Listing 10.2 to throw IllegalArgumentException if the loan amount, interest rate, or number of years is less than or equal to zero
Chapter: 12 / Q: 5
(IllegalTriangleException) Programming Exercise 11.1 defined the Triangle class with three sides. In a triangle, the sum of any two sides is greater than the other side
Chapter: 12 / Q: 6
(NumberFormatException) Listing 6.8 implements the hex2Dec(String hexString) method, which converts a hex string into a decimal number. Implement the hex2Dec method to throw a NumberFormatException if the string is not a hex string
Chapter: 12 / Q: 7
(NumberFormatException) Write the bin2Dec(String binaryString) method to convert a binary string into a decimal number. Implement the bin2Dec method to throw a NumberFormatException if the string is not a binary string
total questions: 772

Questions

772

Views

A PHP Error was encountered

Severity: Warning

Message: Undefined property: stdClass::$TotalViews

Filename: books/book.php

Line Number: 411

Best Answers

299

Points

5