Write a test client to test all your methods in your class

Assignment Help Computer Engineering
Reference no: EM132164233

Assignment

When a user signs in for the first time to a website, the user has to submit personal information, such as user_id, name, email address, telephone number and so on.

Typically, there are two fields for passwords, requiring the user to enter the password twice, to ensure that the user did not make a typo in the first password field.

Write a class encapsulating the concept of processing a form with the following elements:

User_id

Password

Reenter password

Email address

Name

Street Address

City

State

Zip

Telephone

You will store these values as strings in an array.

Write the following methods in your class:

1. A constructor with one parameter, an array of 10 strings (representing one element for each of the fields above), the only instance variable.

2. Accessor, mutator, toString methods

3. A method checking that no Strings are empty. If at least one is empty, return false; otherwise return true.

4. A method returning the number of characters in the user_id

5. A method checking if the two Strings representing the password fields are the same, if they are return true, otherwise false.

6. A method checking if the email address contains one and only one @ character and contains at least one "." after the @ character. If these conditions are met, return true; otherwise return false.

Write a test client to test all your methods in your class.

Reference no: EM132164233

Questions Cloud

Self the same or different than your everyday self : Is your leader "self" the same or different than your everyday "self"? Is this even a valid question?
Court should order the specific performance : The company sued and asked a court to order to fix it. Do you think the court should order the specific performance?
Discuss about the network security policies : Users are complaining that recently implemented changes to network security policies have resulted in password requirements that are too complex.
Describe what should be included in the front matter : Describe what should be included in the front matter? Provide Example.
Write a test client to test all your methods in your class : A constructor with one parameter, an array of 10 strings (representing one element for each of the fields above), the only instance variable.
Examples of successful application of knowledge : Examples of Successful Application of Knowledge of Specific Key Influences on Consumer Behaviour in the food and drink sector
Computes the total cost of the purchase : Develop a program that asks for the number of units sold and computes the total cost of the purchase. Input Validation: Make sure the number of units is greater
Comparing Frederick Douglas and Nat Turner slave narratives : Write a brief essay (4-5 pages, double-spaced, 12-pt. font, Times New Roman) comparing and contrasting the Frederick Douglas and Nat Turner slave narratives
How do squirrels adapt to rattlesnake venom : How do squirrels adapt to rattlesnake venom? How do rattlesnakes adapt to squirrel's defenses against rattlesnake venom?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Create program to read the lengths of the two legs

Write down a program to read the lengths of the two legs of a right triangle and to calculate and display the area of the triangle (one-half the product of the legs) and the length of the hypotenuse (square root of the sum of the square of the leg..

  How much of an area to leave uncut

One problem in timber management is to determine how much of an area to leave uncut so that the harvested area is reforested in a certain period of time.

  Write a statement that toggles on_off_switch

Assume that x is a string variable has been given a value. Write an expression whose value is true if and only if x is a lower-case letter.

  What speed-up do you get with 10 versus 100 processors

Calculate the speedups assuming the matrices grow to 100 by 100. Which are strong scaling and which are weak scaling in this exercise?

  Describe the readability and usefulness of the online user

question 1 discuss the readability and usefulness of the online user manual that you have researched. identify its

  What researchers were surprised to discover with dll file

Write a three to four page paper in which you: Identify what researchers were surprised to discover with Stuxnet's malicious DLL file.

  Take two command line arguments and the dictionary

Your program, called should take two command line arguments, the dictionary, and the text that you wish to spellcheck.

  Program requires to check the current disk drive and report

program requires to check the current disk drive and report.

  Perform an amortized analysis of the running time of n

Suppose that after every K operations, we automatically make a copy of the stack for back-up purposes. (Note the stack may or may not be full at this point.)

  Allows users to make reports on various issues

The Facebook interface is user-friendly and allows users to make reports on various issues. Any person can easily use the interface to report

  Create a constructor method named checkerboard

Create a constructor method named Checkerboard(), which includes code that sets the Frame layout manager to Border Layout.

  Why does a static library have the lib prefix

Why does a static library have the lib prefix? What suffix does it have? Where are the system's library and include files available?

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