Question

Arrays Artistic Solutions wants to keep track of 100 of customers, including the following fields: Customer...

Arrays

Artistic Solutions wants to keep track of 100 of customers, including the following fields:

Customer ID

Last Name

First Name

Street Address

City

State

Zip Code

Phone Number

Email Address

Without access to a database program, you decide that keeping this information in one or more arrays is the best solution. The question is, what kind or kinds of arrays would you use? Discuss whether any or all of the following is suitable for this application, indicating why you would or would not use this kind of array:

A single array for all customers and all fields

Parallel arrays (what would you store in the different arrays?)

Multi-dimensional arrays (what you you store in the different dimensions?)

Can you answer the three questions in bold?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A single array for all customers and all fields
A single array is not a good option here.
Each customer has multiple fields, and you want to store the data of multiple customers,
so, using a single array for all customers and all fields is not suitable for this application.
Where as, if you insist, you can create a structure for each customer with the above fields,
and then you can use an array of 100 customers. But this doesn't mean using single array for
all customers and all fields.

Parallel arrays (what would you store in the different arrays?)
This works perfectly. For each field, you should create an array of 100 elements.
And accessing the data of ith customer simply means accessing the details of ith element
in each array you created. This is the best option of the three available, if you're not
into structures/linkedlists.

Multi-dimensional arrays (what you you store in the different dimensions?)
Multi-dimensional arrays is not an advisable option here. There problem is that, each
field may have its own datatype, like lastname, and firstname may have string datatype,
and zipcode, and customerID may have integer datatype. etc. In that case, the drawback of
arrays is that, it can store only similar type data, and different type of data cannot be
stored in arrays, and will not work here.
Whereas, if you are going to store all the data/fields in the same type assume string
(which is not a usual case), then multi-dimensional is much better than the previous option
parallel arrays.

Add a comment
Know the answer?
Add Answer to:
Arrays Artistic Solutions wants to keep track of 100 of customers, including the following fields: Customer...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Lab 1.4: Arrays, File I/O and Method Review (40 pts) Assume you work for a company...

    Lab 1.4: Arrays, File I/O and Method Review (40 pts) Assume you work for a company that received a list of email addresses of potential new customers from a data broker. Your company receives a file named customers.txt with the below information: Jiming Wu jwu@G.com James Brown Jaime.Boy.Brown@hotmail.com Leanna Perez LeaPerez@att.net Xing Li Xing.Li@sbcglobal.net Stacey Cahill SCahill@G.com Mohammed Abbas downtown_Abbas@yahoo.com Kumari Chakrabarti KukuChakrabarti@att.net Shakil Smith Shakattaq2G.com Jung Ahrin Jung_Ahrin@sbcglobal.net Pedro Martinez Pedro2018@sbcglobal.net Ally Gu I_am_Ally@comcast.com Tamara White Tamtastic@att.net Alvin Ngo...

  • PHP, HTML, CSS I have to make a website for a health club. Or a spa. Or some other kind of business where you have a mem...

    PHP, HTML, CSS I have to make a website for a health club. Or a spa. Or some other kind of business where you have a membership and keep track of transactions for those customers. First I need to create a page where the customer is signed up for a membership. The fields should include: First name Last name Street Address City State Zip Code Email Phone Number I should create a table that has all of that data as...

  • C++ Program - Arrays- Include the following header files in your program:     string, iomanip, iostream Suggestion:...

    C++ Program - Arrays- Include the following header files in your program:     string, iomanip, iostream Suggestion: code steps 1 thru 4 then test then add requirement 5, then test, then add 6, then test etc. Add comments to display assignment //step 1., //step 2. etc. This program is to have no programer created functions. Just do everything in main and make sure you comment each step. Create a program which has: 1. The following arrays created:                 a. an array...

  • Assume that The Queen Anne Curiosity Shop designs a database with the following tables. CUSTOMER (CustomerID,...

    Assume that The Queen Anne Curiosity Shop designs a database with the following tables. CUSTOMER (CustomerID, LastName, FirstName, EmailAddress, EncyptedPassword, City, State, ZIP, Phone, ReferredBy) EMPLOYEE (EmployeeID, LastName, FirstName, Position, Supervisor, OfficePhone, EmailAddress) VENDOR (VendorID, CompanyName, ContactLastName, ContactFirstName, Address, City, State, ZIP, Phone, Fax, EmailAddress) ITEM (ItemID, ItemDescription, PurchaseDate, ItemCost, ItemPrice, VendorID) SALE (SaleID, CustomerID, EmployeeID, SaleDate, SubTotal, Tax, Total) SALE_ITEM (SaleID, SaleItemID, ItemID, ItemPrice) The referential integrity constraints are: ReferredBy in CUSTOMER must exist in CustomerID in CUSTOMER Supervisor...

  • You are a database consultant with Ace Software, Inc., and have been assigned to develop a...

    You are a database consultant with Ace Software, Inc., and have been assigned to develop a database for the Mom and Pop Johnson video store in town. Mom and Pop have been keeping their records of videos and DVDs purchased from distributors and rented to customers in stacks of invoices and piles of rental forms for years. They have finally decided to automate their record keeping with a relational database. You sit down with Mom and Pop to discuss their...

  • This is a C++ program Instructions Design a class named PersonData with the following member variables...

    This is a C++ program Instructions Design a class named PersonData with the following member variables declared as strings: lastName firstName address city state zip phone Create 3 constructors; a default constructor, a constructor that accepts the first and last name member variables, and a constructor that accepts all member variables. Write the appropriate accessor/getter and mutator/setter functions for these member variables. Create a method within this class called getFullName() that returns the person's first and last names as a...

  • Overview This lab provides you the opportunity to insert and update data with the use of SQL comm...

    Overview This lab provides you the opportunity to insert and update data with the use of SQL commands. The lab will utilize the FLIX2YOU problem, the current schema. In order to start this lab, you must have successfully completed Lab # 6. In Lab # 6, you executed a script that was provided to you. This script created 7 of the FLIX2YOU tables as documented in the Entity Relationship Diagram in the FLIX2YOU problem document. The second part of lab...

  • Case study Company Case Campbell Soup Company: Watching What You Eat You might think that a well-known, veteran consumer products company like the Campbell Soup Company has it made. After all, when pe...

    Case study Company Case Campbell Soup Company: Watching What You Eat You might think that a well-known, veteran consumer products company like the Campbell Soup Company has it made. After all, when people think of soup, they think of Campbell’s. In the $5 billion U.S. soup market, Campbell dominates with a 44 percent share. Selling products under such an iconic brand name should be a snap. But if you ask Denise Morrison, CEO of Campbell, she’ll tell you a different...

  • SYNOPSIS The product manager for coffee development at Kraft Canada must decide whether to introduce the...

    SYNOPSIS The product manager for coffee development at Kraft Canada must decide whether to introduce the company's new line of single-serve coffee pods or to await results from the product's launch in the United States. Key strategic decisions include choosing the target market to focus on and determining the value proposition to emphasize. Important questions are also raised in regard to how the new product should be branded, the flavors to offer, whether Kraft should use traditional distribution channels or...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT