Write a program computehalfjava that asks the user to a


Problem 4. [30 points] On Facebook, you have a URL to your profile. If you haven't personalized it will be something like: https://www.facebook.com/9495834758943789

The number at the end is a unique hashcode for your profile generated by Facebook. If you have personalized it, it will be something like: https://www.facebook.com/CS110

 

Problem 1. In this example, CS110 is the name chosen for the personal Facebook profile. Your goal is to write a program FacebookURL.java that asks the user to enter their full Facebook URL. Call the method calculatelD that extracts the personalized part and returns it to the user. The method signature is:

public static String calculateID(String url)

Problem 2. Write a program SalaryCalculator.java that calculates and prints the monthly paycheck for an employee. The net pay is calculated after taking the following deductions on the gross income:

Federal Income Tax: 15%
State Tax: 3.5%
Social Security Tax: 5.75% Medicare/Medicaid Tax: 2.75% Pension Plan: 5%
Health Insurance: $75.00

Your program should prompt the user to input the gross amount. Call the method computeDeductions in which you will print all the deductions and the net pay that will be paid to the employee. Format your output to have two decimal places. The method signature is:
public static void computeDeductions(double salary)

Problem 3. Write a program RemoveChar.Java that asks the user to enter two strings. Write a method concatStrings that concatenates them but omit the first char of each string. Print the concatenated string in the method.
The method signature is:
public static void concatStrings (String first, String second)
Use the above method in the main method on the strings entered by the user to display the concatenated string.

Problem 4. Write a program ComputeHalf.Java that asks the user to a string. Write a method secondHalf that returns the second half of the input string.
The method signature is:
public static String secondHalf (String input)

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a program computehalfjava that asks the user to a
Reference No:- TGS01114898

Now Priced at $40 (50% Discount)

Recommended (96%)

Rated (4.8/5)