Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java Part I For this part, you are required to design and implement the Customer class according to the following * A customer object

image text in transcribedimage text in transcribedimage text in transcribedIn java

Part I For this part, you are required to design and implement the Customer class according to the following * A customer object has four attributes, name (String), street number (int), street name (String), and city Upon the creation of a Customer object, the object must immediately be initialized with valid specifications (String) values; that is name, street number, street name and city value. (Hint: use constructors.) The design should allow enough flexibility so that the value of any of these attributes can be modified later on. For example, it should be possible to create a customer object with a given city and then change it later on. The design should also allow the user to obtain the value of any of the attributes. (Hint: use accessors & mutators.) The design should allow all information of an object to be displayed at once through utilization of System.out.printO method. (Hint: use toString) method) It is required to know how many Customer objects have been created. For that, you need to add a method, called findNumberOfCreatedCustomers), to the class. This method must return number of created Customer objects prior to the time this method is called. The method would simply return 0 if no customers has been created by the time the method is called. (Hint: use Static - You are allowed to add other attributes to the class.) they have the same street name and city. (Hint: use equals) method) method. (Hint: use toSting0 method) It is required to compare two Customer objects for equality. Two Customer objects are equal if It is required to display any Customer object (all info of that object) using System.out.printlnO Part II You are hired by a telephone company to write a software application that helps them keeping track of the customers they have. Write a driver program that will contain the main ) method and it will perform the following: (Note: You can have the main function in a separate driver file, or in the same file if you prefer) Display a welcome message Prompt the user for the maximum number of customers the company can handle. Create an empty array, called userDatabase that will have potential of keeping track of created Customer objects Display a main menu (figure 1) with the following choices and keep prompting the user until they enter a number between 1 and 5 inclusive

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions