This lab explores the difference between the string type and the enum type. The attached header file defines an enumeration type, Color, representing different colors.
Sample output (user input is in bold):
What color do you want to add? red
What color do you want to add? yellow
What color do you want to add? superdupergreen
What color do you want to add? orange What color do you want to add? blue What color do you want to add? blue What color do you want to add? green What color do you want to add? indigo What color do you want to add? violet What color do you want to add? end 0 2 1 4 4 3 5 6
//This is the attached header file called balloon.h
#ifndef BALLOON_H
#define BALLOON_H
enum Color {red, orange, yellow, green, blue, indigo, violet};
#endifPlease find the code below:::
balloon.h
#ifndef BALLOON_H
#define BALLOON_H
enum Color {red, orange, yellow, green, blue, indigo,
violet};
#endif
main.cpp
#include <iostream>
#include <string>
#include <vector>
#include "balloon.h"
using namespace std;
int main( )
{
vector<Color> colors;
Color color;
string input;
while(true){
cout<<"What color do you want
to add? ";
cin>>input;
if(input=="end"){
break;
}else if(input=="red"){
color =
red;
colors.push_back(color);
}else if(input=="orange"){
color =
orange;
colors.push_back(color);
}else if(input=="yellow"){
color =
yellow;
colors.push_back(color);
}else if(input=="green"){
color =
green;
colors.push_back(color);
}else if(input=="blue"){
color =
blue;
colors.push_back(color);
}else if(input=="indigo"){
color =
indigo;
colors.push_back(color);
}else if(input=="violet"){
color =
violet;
colors.push_back(color);
}
}
for(int i=0;i<colors.size();i++){
cout<<colors[i]<<endl;
}
return 0;
}
output:

This lab explores the difference between the string type and the enum type. The attached header...
In a variation on the "secret recipe" part of this lab, one student secretly mixed together two different colors of solution and gave the mixture to another student to analyze. The student placed the sample in the MicroLab spectrophotometer and obtained the following graph of absorbance vs. wavelength. absorbance 400 430 460 500 540 580 620 660 700 viol indg blue grn gr-yel yel org red red wavelength (nm) Which two colors had the first student secretly mixed together? I.e....
I
need the graph exactly as shown in the lab manual please
104 Biology 101L - LAB 9 Paper Chromatography Schalthe n the strip Carones • • chlorophylla chlorophyll. 2. What three factors abied the pigments in the extract to move at different rates! Absorption Spectrum WAVELENGTH ABSORPTION APPROXIMATE COLOR WAVELLINGTM APPROXIMATE COLOR 400 0.399 Violet 560 Yellow LOSS Violet Yellow .02 .05 05 108 440 Violet 450 que Orange Orange Red 480 Blue 163 500 Green Red Red Green...
For each of the solutions described below, determine the pH range for the solution using the information given and the indicator chart Solution A Indicator Used alizarin yellow Indicator color Yellow bromthymol blue yellow methyl violet violet Range bear the 21 less than 7.6 leathen lib really them 5.1 Gooher the 3.2 bromcresol green green methyl red red The pH range for solution A is 3.2 7.6 Solution B Indicator Used methyl red Indicator color yellow Range leroth 67 alizarin...
I've decided I want to create my own new type of Colour representation! I call it ROYGBIVT: Red, Orange, Yellow, Green, Blue, Indigo, Violet, Tartan. Each of those eight colours will be treated as an individual colour channel for each pixel. Each channel will be represented by a 2-bit value. What is the maximum possible number of colours representable for each pixel? And... prove it!
please help!!
In-lab Activity on DNA, DNA Replication and Pro Directions: Complete the color key belowing the Key to colors Adenine - blue Replication and Protein Synthesis Name the DNA modelin class. then awer the questions about the mode ThymineONOMI Deoxyribose Oangcor Red 1. Using the nitrogen base letters to repre your color key and this sequence of colors for the sen blue-blue-orange-yellow-orange-yello Cytosine yellow Guanine - Green COLOR CHOICES Yellow Purple Red Green Orange u to represent nucleotides, wide...
Problem 2 Show that for an index ofrefraction k that D(a) is minimized when sin α- 4 Use this to obtain p- arcsin to obtain ß arcsinand fil in the following table. 4-k2 3k2 a in degrees B in degrees R(a) in degrees Color Red Orange Yellow Green Bluc Indigo Violet 1.331 1.332 1.333 1.335 1337 1.340 1.344 The values of R(a) you obtained in the table accounts for the various color bands that appear in the rainbow as sunlight...
The electronic absorption spectrum UI (Cr(NH3)6]3+ (aq) is shown in Figure 11.5. One of the observed peaks is centered at about 303 nm. 1.a. What is the approximate value of the wavelength for the two other peaks? Which one of these three peaks falls in the visible region of the electromagnetic spectrum? The wavelength at this peak is (Amax), and this transition accounts for the color of the complex ion in solution. The energy of the transition occurring at...
Wrap up question 1: What colors would be reflected by an orange tab if you placed it in red, green, or blue light? Justify your response with the results you had for red and yellow tabs in red, green, and blue light. Wrap up question 2: If you have a yellow light source and every color filter to use, could you produce every other possible color? Explain. Wrap up question 3: If an object is 20 cm from a lens...
Need a Java program, great if anyone is able to help You have been asked to write an analysis of the deer population by town in New Jersey. The accompanying file contains data about each town. The format of the file is the name of the town, square miles and the number of deer counted. You will need to produce the report as follow: Township Square Deer Deer Per Deer/Tick Tick Threat Name Miles Population Square Mile Coefficient Indicator Green...
YES Photosynthesis Lab: Plant Growth and Light Colors Spinach Avg. Height Radish Avg. Height Lettuce Avg. Height Filter Color (cm) (cm) (cm) Red Orange Green Blue Violet Directions: Using the Glencoe virtual lab, use the interface to determine average plant growth under different colors from the light spectrum. Record your data below. Answer the questions below. Make a hypothesis about which color in the visible spectrum causes the most plant growth and which color results in the least plant growth....