Write a program that will create an instance of this class as an object.

Place your order now for a similar assignment and have exceptional work written by our team of experts, At affordable rates

For This or a Similar Paper Click To Order Now

1. Design a class based on a modified Customer Structure similar to the one used in Week 8 (see attachment files). Review Section 13.3. Use private and public definitions as recommended in section 13.2.
Note: C-Strings char arrays should be now built as “string”. This will help to simplify your work.
2. Create class methods (Setters and Getters) that load the data values. The Setter methods will validate the input data based on the criteria below and load the data into the class if valid.
For strings, the data must be within the specified data size. (See #3 below)
For zipCode, the number must be between 0 and 99999.
City and State need to be converted and stored in uppercase.
3. Write a program that will create an instance of this class as an Object. Allow me to enter data for the Object and create and call a method that displays the data for the Object.
During the input process, pass the input data to the setter method and confirm that the data entered is valid based on the class method return value. If not valid, prompt for me to re-enter the data until it does pass the class method’s validation.(A do-while loop works well for this situation) I only need to enter the data for 1 instance of the class. The best way to do this is for the setter methods to return bool instead of void. If the data is valid, return true. Otherwise return false.
There is no need to loop for multiple instances of the object. Do not use cin statements inside the class method definitions.
Below is the original structure to use to create your class definition.
const int NAME_SIZE = 20;
const int STREET_SIZE = 30;
const int CITY_SIZE = 20;
const int STATE_CODE_SIZE = 3;
struct Customer {
long customerNumber;
char name[NAME_SIZE]; // change to string name;
char streetAddress_1[STREET_SIZE]; // change to string
char streetAddress_2[STREET_SIZE]; // change to string
char city[CITY_SIZE]; // change to string
char state[STATE_CODE_SIZE]; // change to string
int zipCode;};Hints: The const variables need to be defined outside of the class definition.
All access to the data in the class must use public methods that you define. DO NOT DIRECTLY ACCESS the customer data items.
The class level input methods should return a boolean to confirm the data was loaded and passed any size or data ranges. The customerNumber setter does not need to return a value – It can be a void setter.
Set the customerNumber to 1 via the code – not user input. There is no input loop so only 1 set of customer’s data is to be entered.
Work on 1 task/data item at a time. Create a getter/setter for customer number, set it, display it, then move to name, etc. If you get stuck, ask for help.
The upper casing of the City and State involve using a loop and treating the string as an array – use toupper to convert each character.
i.e.
FOR loop – start at 0 – while index < string.length()
street_1[idx] = toupper ( street_1[idx]);
Avoid cout statements in the class definition – as in for bad data. A class typically does not contain IO related code unless that is its purpose. For the task to display all the data, it would be acceptable for our purposes if this method is part of the class definition.
The deliverable is a working CPP program – similar to Program 13.1 AND a UML diagram of the Customer class ( See Section 13.16 8th ed, or Section 13.15 9th ed.)

For This or a Similar Paper Click To Order Now

SmiteWriter
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.