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?
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.
Arrays Artistic Solutions wants to keep track of 100 of customers, including the following fields: Customer...
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 [email protected] James Brown [email protected] Leanna Perez [email protected] Xing Li [email protected] Stacey Cahill [email protected] Mohammed Abbas [email protected] Kumari Chakrabarti [email protected] Shakil Smith Shakattaq2G.com Jung Ahrin [email protected] Pedro Martinez [email protected] Ally Gu [email protected] Tamara White [email protected] 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 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: 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...
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...
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 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 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...