Write a program computehalf.java

Assignment Help JAVA Programming
Reference no: EM13834654

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)

Reference no: EM13834654

Questions Cloud

Analyze the proposition of franco modigliani and merton : Analyze the proposition of Franco Modigliani and Merton Milles (MM). "When there are no taxes and capital markets work well, the market value of a company does not depend on its capital structure. In other words, CFOs cannot increase the value by cha..
To access and download stock and index price : The objectives of this exercise: 1. To access and download stock and index price data from yahoo.com. 2. To discern the difference between a real-time closing price and an adjusted price. 3. To discover how yahoo.com calculates beta for an individ..
How much must the balance of the fund equal on june : Stephen intends to make equal contributions on June 30 of each of the years 2010-2013. (Round all answers to 2 decimal places, e.g. 10,250.25.) (a) How much must the balance of the fund equal on June 30, 2013, in order for Stephen Bosworth to satisfy..
Explain the relationship between mechanical work and energy : Explain the relationship between mechanical work and energy.Define Mechanical Work. Define energy, kinetic energy & gravitational potential energy.
Write a program computehalf.java : 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.
What is the npv of her decision if she decides to do an mba : Assume that cash inflows occur at the end of the year, while the cash outflows (tuition payments) occur at the beginning of the year. If she goes to work now, she can expect a salary of $50,000 per year for each of the next 20 years. If she gets an M..
How creativity and innovation relates to own situation : Can you have Innovation without Creativity? Can people be more creative through the use of thinking tools? Can the human brain be used better, more creatively? Where does learning, artistry, memory, experience, education etc.
Discuss the various type of risk you are likely to encounter : Your boss makes it clear that any successful bid must demonstrate a balance between risk and price.Explain why this is so, specifically, why price and risk are seen as equally important but opposite issues in determining the winner of the contract. I..
Childhood obesity is growing at an increasing rate : Childhood obesity is growing at an increasing rate

Reviews

Write a Review

JAVA Programming Questions & Answers

  Ask the user how many times you want to run

c the algorithm. 2. Then choose a word at random from the array of Strings as the target (Use the integer random number generator)

  Implement class that can be player in a game of tic tac toe

Specify, design, and implement a class that can be one player in a game of tic-toc-toe. The constructor should be specify whether the object is to be the first player (X's) or the second player (O's).

  Question hierarchy of section

Add a class AnyCorrectChoiceQuestion to the question hierarchy of Section 9.1 that allows multiple correct choices. The respondent should provide any one of the cor- rect choices. The answer string should contain all of the correct choices, separa..

  Write a java program that asks the user for his/her gender

According to researchers at Stanford Medical School, the ideal weight for a woman is found by multiplying her height in inches by 3.5 and subtracting 108.

  We will simulate a very simple network by having a process

we will simulate a very simple network by having a process correspond to a node in the network and files correspond to

  Write and describe the definition of what composition is

write and explain the definition of what composition is and how it is useful in writing an object-oriented program.

  Write a version of sumpairs

Write a version of sumPairs  that sums each component of the pairs separately, returning a pair consisting of the sum of the first components and the sum of the second components. So basically [(3,1)(10,3)] would return (13,4).

  Write a recursive instance method

Write a recursive instance method

  Write java program to utilizes gui with five text fields

Write down the program called MaxMinAvgGUI.java which utilizes GUI with five(5)text fields which asks user to enter 5(five) decimal numbers. 1(one)number in each text field.

  String copy and string concatenation functions

Write the string copy and string concatenation functions -  Append n characters from string2 to stringl by using pointer arithmetic

  Write a class called misc that has no instance variables

Write a static double method called evaluateQuadraticPolynomial that takes four double parametersa, b, c, and x and returns the value of ax^2 + bx + c

  Demonstrate the use of conditional and looping structures

The application should have two classes; at least one class in addition to the application's controlling class. The source code must demonstrate the use of conditional and looping structures.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd