Question
Specifications: Lab01a: 1. Has an array of 5 elements that will accept the names of up to five animals 2.Has an array of 5 elements
Specifications:
Lab01a:
1. Has an array of 5 elements that will accept the names of up to five animals
2.Has an array of 5 elements that will store a list of up to five animal ages
3.Accepts the name(s) and age(s) of one to five animals. Input should cease at the fifth entry, or when the user enters the word STOP, stop or Stop. (5 points)
The animal names can be one or more words. Assume at least one animal will be entered.
4.Display the following (5 points)
a.Display your name and major (See screenshots below)
b.Displays the list of animals and their ages. Each animal name must have a corresponding age.
Create program
Lab01b that:
5.Has a Vector that will accept and store the animal names
6.Has a Vector that will accept and store the animal ages
7.Accepts the name(s) and age(s) of one to five animals. Input should cease at the fifth entry, or when the user enters the word STOP, stop or Stop. (5 points)
You MUST use the push_back method when adding items to the vector. The animal names can be one or more words. Assume at least one animal will be entered.
Display the following (5 points)
a. Display your name and major (See screenshots below)
b. Displays the list of animals and their ages. Each animal name must have a corresponding age.
This program should be done in c++. The program should use loops to check stop, Stop, and STOP. Don't use break.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started