1. Create a class named Contact with the following attributes: First name, Middle name, Last name,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create a class named Contact with the following attributes: First name, Middle name, Last name, Date of birth, Gender, Anniversary, Address, Area, City, Pincode, State, Country, Telephone number, Mobile number, Email, Website. (Contact.java) 2. Write a method named validate() in the Contact class created earlier. This method must generate an exception if any of the following validation rules fail: i. First name, last name, date of birth and email are compulsory. ii. E-mail must be in the correct format, display correct format. iii. At least one of either telephone or mobile number must be specified Note: Do not use Predefine collection classes (API) while implementing 3. Implement stack for Contact objects. Use exception handling to apply the following rules: i. ii. iii. A pop must fail on an uninitialized stack and empty stack A push must fail on an uninitialized stack and stack which is already full A push must fail on a stack if the Contact object's validation fails. 1. Create a class named Contact with the following attributes: First name, Middle name, Last name, Date of birth, Gender, Anniversary, Address, Area, City, Pincode, State, Country, Telephone number, Mobile number, Email, Website. (Contact.java) 2. Write a method named validate() in the Contact class created earlier. This method must generate an exception if any of the following validation rules fail: i. First name, last name, date of birth and email are compulsory. ii. E-mail must be in the correct format, display correct format. iii. At least one of either telephone or mobile number must be specified Note: Do not use Predefine collection classes (API) while implementing 3. Implement stack for Contact objects. Use exception handling to apply the following rules: i. ii. iii. A pop must fail on an uninitialized stack and empty stack A push must fail on an uninitialized stack and stack which is already full A push must fail on a stack if the Contact object's validation fails.
Expert Answer:
Answer rating: 100% (QA)
1 Contactjava class Contact String firstName String ... View the full answer
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these computer network questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
How to go about measuring the effectiveness of the services offered, what evidence-based tools should be used (2-3 tools), and why?
-
Guidance Residential in Reston, Virginia, offers a Shari'ah-compliant housing finance product for Muslims and others who do not believe in collecting or paying interest. Under their Declining Balance...
-
In an ideal Brayton cycle, air is compressed from 100 kPa and 25C to 1 MPa, and then heated to 1200C before entering the turbine. Under cold-air-standard conditions, the air temperature at the...
-
Investigate the Sony Playstation Network hack that occurred in April 2011. a. What type of attack was it? b. Was the success of the attack due to technology problems at Sony, management problems at...
-
White Company can invest in one of two projects, TD1 or TD2. Each project requires an initial investment of $101,250 and produces the year-end cash inflows shown in the following table. Required 1....
-
On May 31, 2010, James Logan Company had a cash balance per books of $6,781.50. The bank statement from Farmers State Bank on that date showed a balance of $6,404.60. A comparison of the statement...
-
A. Project of a building with 25 flats being evaluated for 15 years. Because of the growth for the city only 90% from the flats will be rented. This project has construction cost of 200000 and tand...
-
In the Chapter 11 Data Analytics Case, you used Tableau to examine a data set and create calculations to compare the relative age of two companies assets. In this case you continue in your role as an...
-
The Price of a table and chair is Rs.200 and Rs. 140 of table and chair is increased by 20%! respectively If the price and 30 % respectively. Find the net value/price of 2 dozen tables f 25 chairs ?
-
A contract where the buyer pays a minimal amount for each unit purchased from the supplier, but shares a fraction of the revenue for each unit sold is a buyback or returns contract. revenue-sharing...
-
At a train station where lines intersect, the Mumbai dabbawalas perform a forward logistics function. a reverse logistics function. a milk run. a cross-docking function.
-
Understand the role of revenue management in a supply chain.
-
Does aggregation of inventory at one location better suit a company like IKEA that sells Lack tables or a retailer like Next that sells clothing items online? Explain by considering transportation...
-
A contract that allows a retailer to return unsold inventory up to a specified amount, at an agreed-upon price, is a buyback or returns contract. revenue-sharing contract. quantity flexibility...
-
2. A bank has the following balance sheet. The loans have a 3-year maturity and earn 4.3% annually. The interest is paid once a year and the principal will not be repaid until maturity. The...
-
Nate prepares slides for his microscope. In 1 day he prepared 12 different slides. Which equation best represents y, the total number of slides Nate prepares in x days if he continues at this rate? A...
-
List the changes you would need to make in your answer to Question 7 if they could have more than one advisor.
-
What is multiplicity?
-
The requirements shown in Question 11 have changed. The dentists office would like to add the date of the patients last payment. In which relation (table) would you place this attribute? Why? Data...
-
Discuss four important risk and tax-related considerations that are relevant to Omos portfolio. With most of Omos personal net worth tied up in his software company, he is asset rich but cash poor....
-
Determine the most appropriate strategy that can generate liquidity and accomplish Omos goals. Justify your response. Jing asks Omo about his plans for the shares of his previous employers company....
-
Recommend, for both Enlows niece and nephew, the most tax-efficient wealth transfer option (lifetime gift or testamentary bequest). Show your calculations. Recommend, for both Enlow's niece and...
Study smarter with the SolutionInn App