Encapsulating the concept of processing

Assignment Help Business Economics
Reference no: EM131432348

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: EM131432348

Questions Cloud

Who is the narrator : Who is the narrator? what is his attitude toward Miss Emily? What values are reflected by his observation about Miss Emily and about the town and its citizens?
Whats wrong with given strategy : Because we usually control the value of a, one could simply set the probability of a type I error to a very small value, say 0.0001. What's wrong with given strategy?
For hypotheses describe the type i and type ii errors : Write the null and alternative hypotheses about m, the mean number of cars per day that cross the Tappan Zee Bridge.- For the hypotheses in part (a), describe the type I and type II errors.
Identify the types of descriptive statistics : Identify the types of descriptive statistics that might be best for summarizing the data, if you were to collect a sample. Analyze the types of inferential statistics that might be best for analyzing the data, if you were to collect a sample
Encapsulating the concept of processing : 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 pas..
Discuss about the objective positivist neoanalytic writers : While there are many neoanalytic writers, they can be divided into two general categories. Some are objective positivist thinkers while others are relativistic/constructivist thinkers. Philosophically, what is the difference among objective positi..
Which error is more serious for the race organizers : Describe type I and type II errors in this context.- Which error is more serious for the swimmers? Why?- Which error is more serious for the race organizers? Why?
Negative aspects of employing a mandatory access control : Explain in your own words the elements of the following methods of access control: Mandatory access control (MAC) and Discretionary access control (DAC)
Knowledge of sql server : You work for a manufacturing company. The company has recently hired a programmer who does not have knowledge of SQL Server, but has been tasked to develop -queries. As a database administrator, you have been tasked with the following to help him/..

Reviews

Write a Review

 

Business Economics Questions & Answers

  Permitting production of particular good

When will the society be better off not permitting production of a particular good?

  What are the monopolists profit-maximizing price

Suppose that one company acquires all the suppliers in the industry and thereby creates a monopoly. Illustrate what are the monopolist's profit-maximizing price and total output.

  Welfare loss triangle occur to total surplus

Assume the equilibrium quantity is 10M of automotive wiper blades at an equilibrium price of $2 per blade. If the government imposes a limit of 8M wiper blades for the private sector in order to support an increased need for rubber in classified oper..

  Economics-chocolate company

Consider the problem of opening your own chocolate candy retail business in your local town. In order to do this, you need estimates on the amount of chocolate candy you can sell in a given month, as well as estimates on the cost of running your b..

  What is the present worth for each scenario

Define optimistic, most likelys, and pestimistic scenarios buy using both optimistic, both most likely and both pestimistic estimates. Use a life of 4 years as the most likey value. What is the present worth for each scenario

  Internet has changed the market structure

Shortly discuss how the development of the Internet has changed the market structure in which companies operate. Assume that most firms can be categorized as being in perfect competition, monopolistic competition, oligopoly, or monopoly. Keep in mind..

  Explain what the slope of the budget constraint

Provide an interpretation for the budget constraint. Explain what the slope of the budget constraint is. Explain what sign cant about the point of tangency is between highest in difference curve and the budget constraint. At this point of tangency, w..

  Use of financial intermediation benefit the economy

The topic of banking and its role in the economy has been an interest of many students in this class due to the experiences during the 2008 recession. Many find this chapter enlightening as a way to better understand the economic history of 2008/2009..

  Centralized warehouse or the regional warehouses

A firm is trying to decide whether to have a centralized warehouse or regional warehouses. A centralized warehouse would be cheaper than four regional warehouses, but the expenses for shipping would be higher with a centralized warehouse. If the firm..

  Government has a fixed exchange rate policy

Discuss the following statement: Whenever the output is below potential and the government has a fixed exchange rate policy, it can use monetary policy to stimulate the economy and bring it back to full potential.

  Short-run demand for gasoline is less elastic

Why the short-run demand for gasoline is less elastic than the long-run demand, when the price of gasoline rises, people immediately cut back on unnecessary trips.

  What steps do governments take to increase vaccination rates

Public health information can be broadcast at a cost of $100. Public health information is a pure public good, in that many people can use the information simultaneously and preventing people from using the information is very difficult. What are the..

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