1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
scoundrel [369]
3 years ago
15

You are working as a Software Programmer for one of the big retail company. You need to implement the program that can store at

least 15 customer information using the Array concept. You need to implement the individual array to store each of below field. CustomerName CustomerAddress1 City State Zip Once the data is stored in the array, then you need to loop thru the entire zip loop and print all the zip code on the command line.
Computers and Technology
1 answer:
Aleks [24]3 years ago
5 0

Answer:

The C++ code is given below with appropriate comments. Random names of customer information are chosen as samples

Explanation:

#include <iostream>

using namespace std;

int main()

{

// Initialize String Arrays for customerName,customerAddress1,city,state,zip for 15 customers

string customerName[15] = {"Liam","Noah","William","James","Logan","Benj","Mason","Elijah","John","Patty","Cheryl","Nick","Brian","Steve","mark"};

string customerAddress1[15] = {"Liam - Address1","Noah - Address2","William - Address3","James - Address4","Logan - Address5","Benjamin - Address6","Mason - Address7","Elijah - Address8","John - Address9","Patty - Address10","Cheryl - Address11","Nick - Address12","Brian - Address13","Steve - Address14","mark - Address15"};

string city[15] = {"Sitka","Juneau","Wrangell","Anchorage","Jacksonville","Anaconda","Oklahoma City","Fort Worth","Dallas","Sitka","Juneau","Wrangell","Anchorage","Jacksonville","Anaconda"};

string state[15] = {"Alaska","Alaska","Alaska","Alaska","Florida","Montana","Montana","Oklahoma","Texas","Arizona","Tennessee","California","Virginia","Indiana","Virginia"};

int zip[15] = {30041,36602,75062,78952,12071,55874,11236,44512,55262,99874,11020,55820,11304,11587,11047};

// Print Zips for the customers

cout <<"Customer Names"<<"\t"<< "Zip Code"<< "\n";

for (int i = 0; i < 15; i++)

cout <<customerName[i]<<"\t\t\t"<< zip[i] << "\n";

}

You might be interested in
5.23 LAB: Contains the character
torisob [31]

Answer:

In C++:

#include<iostream>

#include<vector>

using namespace std;

int main() {

int len;

cout<<"Length: ";  cin>>len;

string inpt;

vector<string> vect;

for(int i =0;i<len;i++){

  cin>>inpt;

  vect.push_back(inpt); }

char ch;

cout<<"Input char: ";  cin>>ch;  

for(int i =0;i<len;i++){

  size_t found = vect.at(i).find(ch);  

      if (found != string::npos){

          cout<<vect.at(i)<<" ";

          i++;

      }

}  

return 0;

}

Explanation:

This declares the length of vector as integer

int len;

This prompts the user for length

cout<<"Length: ";  cin>>len;

This declares input as string

string inpt;

This declares string vector

vector<string> vect;

The following iteration gets input into the vector

for(int i =0;i<len;i++){

  cin>>inpt;

  vect.push_back(inpt); }

This declares ch as character

char ch;

This prompts the user for character

cout<<"Input char: ";  cin>>ch;  

The following iterates through the vector

for(int i =0;i<len;i++){

This checks if vector element contains the character

  size_t found = vect.at(i).find(ch);  

If found:

      if (found != string::npos){

Print out the vector element

          cout<<vect.at(i)<<" ";

And move to the next vector element

          i++;

      }

}  

7 0
2 years ago
An attacker obtains a connection to your LAN and then uses SETH to perform a MiTM attack between your system and the company RDP
maxonik [38]

The type of attack which has occurred in this scenario is known as credential harvesting.

<h3>What is credential harvesting?</h3>

Credential harvesting is also known as account harvesting and it can be defined as a type of attack that involves the use of the following techniques to illegally obtain large numbers of user credentials (username or password):

  • MITM attacks
  • DNS poisoning
  • Phishing

In conclusion, the type of attack which was used in this scenario is known as credential harvesting.

Read more on phishing here: brainly.com/question/23850673

#SPJ1

3 0
2 years ago
What is elif? How does it work in python?
pav-90 [236]
It is the condition used after the if condition. say you use the if condition and you need to add another outcome, instead of using the if condition again, you’d use elif and end it with the else command.

example:

if num == 10:
print (“correct”)

elif num > 10:
print (“too high”)

else:
print (”too low”)

hope this helps :]
5 0
3 years ago
Read 2 more answers
Which of the following is an example of an output device on a smartphone?
Andru [333]

Answer:

The speaker

Explanation:

Speakers are output devices because the audio is taken from the app or website and playing it towards the speakers.

7 0
3 years ago
White meat and dark meat fish have slightly different nutritional characteristics. What are the nutrition characteristics of dar
ipn [44]

The nutrition characteristics of eating darker meat of fish like Salmon are that it is higher in healthy Omega-3 fats. It is true, however, that as much as it has the highest Omega-3 fats, it is also likely to be highest in any potential toxins.






6 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the case studies that you read (Walmart, Target or 5 Big Data Industries) caught your attention and why? Before reading
    11·1 answer
  • A ___________ is used when an extra digit is added to a coded field to make sure it the entered data is correct (like social sec
    14·1 answer
  • A customer states that when she removes the printed pages from her laser printer output tray, the black ink smears all over her
    14·1 answer
  • Consider the following 32 bit binary representation of the value using IEEE 754 single precision floating point representation.
    15·1 answer
  • Which statement best expresses the use of Internet sources in a research project versus other types of sources?
    14·1 answer
  • Design aPayrollclass that has fields for an employee’sname, ID number, hourly pay rate,and number of hours worked. Write theappr
    9·1 answer
  • Many Web browsers allow users to open anonymous windows. During a browsing session in an anonymous window, the browser does not
    14·1 answer
  • ______design A plan for the actual implementation of the system.
    9·2 answers
  • May I ask, when you accidently drop your laptop into a pool,...(water) . Will the Data and Many other information... inside the
    5·2 answers
  • OMG 2 TIMES ;DDDDDDDDDDDDDDDDD​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!