Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

Sammy's Seashore Supplies rents beach equipment to tourists. In previous chapters, you have developed a class that holds equipment rental information and an application that tests the methods using four objects of the class. Now modify the Rental and RentalDemo classes as follows:

• Modify the method that sets the contract number in the Rental class so that if the argument passed to the method is not a four-character String that starts with a letter followed by three digits, then the contract number is forced to "A000". If the initial letter in the contract number is not uppercase, force it to be so.

• Add a contact phone number field to the Rental class.

• Add a set method for the contact phone number field in the Rental class. Whether the user enters all digits or any combination of digits, spaces, dashes, dots, or parentheses for a phone number, store it as all digits. For example, if the user enters (920) 872-9182, store the phone number as 9208729182. If the user enters a number with fewer or more than 10 digits, store the number as 0000000000.

• Add a get method for the phone number field. The get method returns the phone number as a String constructed as follows: parentheses surround a three-digit area code, followed by a space, followed by the three-digit phone exchange, followed by a hyphen, followed by the last four digits of the phone number.

• Modify the RentalDemo program so that besides the contract number and minutes, the program also prompts the user for and retrieves a contact phone number for each of the sample objects. Display the phone number along with the other Rental details. Test the RentalDemo application to make sure it works correctly with valid and invalid contract and phone numbers.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92777168

Have any Question?


Related Questions in Computer Engineering

Answer the following questions suppose that multiplying two

Answer the following Questions : Suppose that multiplying two general n by n matrices takes 3 seconds on a given computer, if n = 1000. Estimate how much time it will take to compute the LU-decomposition of such a matrix ...

Question show step by step how bubble sort will work on the

Question : Show step by step how bubble sort will work on the following array: 10, 4, 9, 7, 3. Draw the array for every candidate swapping in every iteration separately. Mark the swapped elements and mark the iterations ...

Question create for your company amp conduct cyber

Question: Create for your company & conduct cyber assessment using the CSET Cybersecurity Framework (CSF) requirement-based assessment a. complete site info b. Sector & demo: i. [Select your business] ii. [Select your bu ...

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

Question when a syscall is called which register must have

Question : When a syscall is called which register must have the syscall number? Which syscall is a must for every program? Why?

System analysis and designbarbara singleton manager of

system analysis and design. Barbara Singleton, manager of western regional sales at the WAMAP Company, requested that the IS department develop a sales force management and tracking system that would enable her to better ...

What conclusions can you draw about the heat of solution

What conclusions can you draw about the heat of solution for the three salts tested and the effect on the temperature changes when the salts were dissolved in water? Your answer should include the words Endothermic and E ...

A calling agency has data showing that the average response

A calling agency has data showing that the average response time is 5.6 minutes with a standard deviation of 1.8. The manager wants to know how much time is required for 75% of all calls to be handled (in other words, th ...

Question purpose to assess your ability tobulldiscuss

Question: Purpose: To assess your ability to: • Discuss terminology, concepts, and procedures related to database management systems. Action Items: • Write your response to 2 of the following discussion topics and post y ...

In thenbspworkspaceproject-lognbspdirectory create file

In the ~/workspace/project-log directory, create file named  changelog.txt  with the following content and format: Changelog Version: 1.0 Redirect the output of the ls command to a file named  file-list.txt  in the ~/wor ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As