I need help with these two question..has any one got idea for these two question..
Question 1:
I need to write an application that accepts a user’s password from the keyboard. When the entered password is less than six characters, more than ten characters, or doesn’t contain at least one letter and one digit, prompt the user again. When the user’s entry meets all the password requirements, prompt the user to re-enter the password, and do not let the user continue until the second password matches the first one.
Question 2:
I have been asked to write a Java application that will calculate an estimated tax for a tax payer, based on keyboard responses. This application will be used by taxpayers to calculate their personal tax liability.
The TaxReturn class contains field for taxpayer’s Social Security Number, surname, first name street address, city, post code, annual income, marital status, and tax liability. Include a constructor that requires arguments that provide value for all of the fields other than the tax liability based on annual income and marital status:
Single Married
Income
0 - 15000 5% 5%
15001- 25000 15% 10%
25001 – 40000 25% 20%
40001 Over 35% 30%
Create an application that prompts a user for the data needed to create a tax return display that contains details of the taxpayer in a readable presentable format along with their tax liability and the date.
Your application should make the following validations
The SSN should be in the right format, i.e 9 characters, the first two and the last one are letters, the rest are numbers.
The Post code should not be more than 7 characters, the first two are letters the third is a number and the rest doesn’t matter (for the sake of this exercise)
Maritial status cannot accept any other character than m,M,s,S
And of course the annual income cannot be negative.