Java | JSP | JSF Answers

Questions answered by Experts: 3 611

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

3. Write a program with which you can convert a human height given in feet and inches



to centimeters. The program should ask the user to type in his or her height in two



parts: first the height in feet and then the inches part for the height. (A person can



say that his or her height is, for example, 5 feet and 9 inches. That would be 30.48



* 5 + 2.54 * 9 centimeters.



There can be thus two separate input statements in the program. After the program



has received the feet and the inches, it should calculate the corresponding value in



centimeters and print it to the screen.


You have been tasked to create a class called Abaaneke, your class should contain four private variables (customerName , deposit, oldBalance, newBalace) using the appropriate data types.



Your class should also have a method that takes three arguments – name of account holder, amount deposited and old balance. The method should add the deposit to the oldBalance and call it new balance.



Using the right setters and getters, initialize the private variables and call the method to display the following



a. Account holders name



b. Amount deposited



c. Old balance



d. And new balance



The user should be able to repeat the running of the program as many as he/she wishes


(Kindly write a full Java program)

You have been tasked to create a class called Abaaneke, your class should contain four private variables (customerName , deposit, oldBalance, newBalace) using the appropriate data types.



Your class should also have a method that takes three arguments – name of account holder, amount deposited and old balance. The method should add the deposit to the oldBalance and call it new balance.



Using the right setters and getters, initialize the private variables and call the method to display the following



a. Account holders name



b. Amount deposited



c. Old balance



d. And new balance



The user should be able to repeat the running of the program as many as he/she wishes


(Kindly write a full Java program)

Create a program that will display the corresponding remark of a given input grade. The range of grades and its corresponding remark are given below:



Note: Use switch case statement



Range of Grades Remarks


90-10 Excellent


80-89 Good


75-7 Fair


50-74 Poor


Other grades Out-of-range



Businesses are categorized as small, medium, & large based on their turnover profit. If up to $5,000 profit is realized in a month, business should be classified as small, $5,000 but up to $10,000 is realized in a month, business should be classified as medium, when more than $10,000, the business should be considered as large. Your application should:

 

a) Request for a company's profit to be entered. Categorize the company into small, medium, and large scale based on the profit made.

 

b) Create a method to compute the following taxes:

1. Small scale, first $2500 tax of 3.5% and 6.7% for any other profit made

2. Medium scale, first $7800 tax of 6.6% and 9.2% for any other profit

3. Large scale, first $16000, tax of 9.3% and 13% for any other profit. NB. Percentage profit is per month

 

c) Program should calculate 2% extra tax on the calculated tax for refuse collection and display the following result:

1. Category, tax and refuse tax

2. Total tax which is the sum of the tax and refuse tax.


Create a program that will display the corresponding college level of s given input year level. The year and the college are given below:









Note: Use if else if statement.









Year Level College Level





1 Freshmen





2 Sophomore





3 Junior





4 Senior





Other years Unlisted Level

Create a program that will display the corresponding college level of s given input year level. The year and the college are given below:




Note: Use if else if statement.




Year Level College Level


1 Freshmen


2 Sophomore


3 Junior


4 Senior


Other years Unlisted Level








Create a program that will display the corresponding remark of a given input grade. The range of grades and its corresponding remark are given below:



Note: Use switch case statement



Range of Grades Remarks


90-100 Excellent


80-89 Good


75-79 Fair


50-74 Poor


Other grades Out-of-range

Create a simple text-based console game that implements at least three (3) interfaces.


1. Using your preferred IDE or this online IDE, create a Java stack consisting of four (4) book titles entered by the user. Pop the stack's elements one by one; each popped element will be added to a queue. Then, print the content of the queue.



LATEST TUTORIALS
APPROVED BY CLIENTS