I've posted this question several times.  T-T) huhu... i just need the source code in java language. thank you. don't answer #6 i already got it from my previous post.   1: Create a new class with attributes name and address. Both data type will be String. Create a constructor and assign the parameters to the attributes. Now override the toString() method. Is this possible? 2: Create a class with the main method and create an instance of the class that you created in Test Stem 1. What method can you call to get the hashCode of your class? 3: What is the return type of the hash code ? 4: Create an instance of the string in your test class and assign a value. Which of the following operators can be used in conjunction with a string object? + - & . += 5: Supposed that we have a string with a value “This is my string.”. Which method can be used to extract a specific word from the given string? 6: Supposed that we have a string with a value “This is my string.”. Which expression can be used to extract the word “my” from the given string? 7: Now create an String and assign a value with spaces in the beginning, end and middle. Try out the method trim(). What does it do?

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 2.15CP
icon
Related questions
Question

I've posted this question several times.  T-T) huhu... i just need the source code in java language. thank you. don't answer #6 i already got it from my previous post.

 

1: Create a new class with attributes name and address. Both data type will be String. Create a constructor and assign the parameters to the attributes. Now override the toString() method. Is this possible?

2: Create a class with the main method and create an instance of the class that you created in Test Stem 1. What method can you call to get the hashCode of your class?

3: What is the return type of the hash code ?

4: Create an instance of the string in your test class and assign a value. Which of the following operators can be used in conjunction with a string object?

  • +
  • -
  • &
  • .
  • +=

5: Supposed that we have a string with a value “This is my string.”. Which method can be used to extract a specific word from the given string?

6: Supposed that we have a string with a value “This is my string.”. Which expression can be used to extract the word “my” from the given string?

7: Now create an String and assign a value with spaces in the beginning, end and middle. Try out the method trim(). What does it do?

8: In your test class with main method, instantiate a string buffer with the initial value of “hello”. How will you be able to do that?

9: In your test class with main method, instantiate a string buffer with the initial value of “hello”. Use the method setLength with parameter 2. Print the string representation of the StringBuffer using toString(). What is the result?

10: Which method is not defined in the StringBuffer class?

a.appends

b. codePointCount

c. insert

d. lastIndexOf

5. Use the table below to compute the withholding tax.
Monthly Gross Income and Withholding Tax Details
Withholding Tax
Over
But Not Over
20,000
31,000
0%
20% of the excess over 20,000
20,000
Assessments
31,000
61,000
154,000
615,000
61,000
154,000
615,000
2,300 + 25% of the excess over 31,000
10,000 + 30% of the excess over 61,000
38,000 + 32% of the excess over 154,000
185,000 + 35% of the excess over 615,000
Transcribed Image Text:5. Use the table below to compute the withholding tax. Monthly Gross Income and Withholding Tax Details Withholding Tax Over But Not Over 20,000 31,000 0% 20% of the excess over 20,000 20,000 Assessments 31,000 61,000 154,000 615,000 61,000 154,000 615,000 2,300 + 25% of the excess over 31,000 10,000 + 30% of the excess over 61,000 38,000 + 32% of the excess over 154,000 185,000 + 35% of the excess over 615,000
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage