An integer number is said to be a perfect number if its factors, including 1 (but not the number itself), sum to the number. For example, 6 is a perfect number, because 6 = 1 + 2 + 3. Write a method perfect that determines whether parameter number is a perfect number. Use this method in an application that determines and displays all the perfect numbers between 1 and 1000. Display the factors of each perfect number to confirm that the number is indeed perfect. Challenge the computing power of your computer by testing numbers much larger than 1000. Display the results
A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. • Write an application that calculates and displays the parking charges for each customer who parked in the garage yesterday. You should enter the hours parked for each customer. The program should display the charge for the current customer and should calculate and display the running total of yesterday's receipts. The program should use the method calculateCharges to determine the charge for each customer
Write a program that asks the user to enter an account number as a string. The account number consists of 8 characters and is divided as follows: The first 2 characters are digits and represent the branch (00 for Beirut, 01 for Saida, 02 for Tripoli). The remaining 6 characters represent the customer’s account number A valid account number consists of exactly 8 characters. If the account is valid, the program prints the details (branch and account number). If the account is not valid, the program displays a message to the user.
Implement a client class to test the Apartment class as follows: 1. Create an array of Apartment objects of size 5. 2. Fill it with five Apartment objects according to your choice as a programmer (NOT from the user) 3. Print the description of all apartments in the array which are located in “Beirut” 4. Display the size assessment of each apartment in the array. 5. Display the city of all apartment objects that are formed of two stories
How we Implement a generic Queue class in java and work with different data types (complete code)
I ask you question thank you for your response but it's main class only
implement a generic Queue class in java and work with different data types.
Design loan calculator using JSP which accepts Periodof Time (in years) and Principal Loan Amount. Display
the
payment amount for each loan and then list the loan
balance and interest paid for each payment over the
term of the
loan for the following time period and interest rate:
a. 1 to 7 year at 5.35%
b. 8 to 15 year at 5.5%
c. 16 to 30 year at 5.75%
*Based on answer choices A-E, what is the code's output?
10. Which is a sample regular expression that accepts alphanumeric characters only?
A. [a-z0-9]
B. [a-zA-Z0-9]
C. [A-Z0-9]
D. [a-zA-Z]?[0-9]
E. [a-zA-Z]?(0-9)
*Based on answer choices A-E, what is the code's output?
8. Which of the following can match a, b, c, or e?
A. [abc]
B. [-abc]
C. [?abc]
D. [*abc]
E. [^abc]