Write the non modular version of this solution. Start with the implementation provided in proj6-sequentialMain2.cpp and implement the functionality found in proj6-modularMain2.cpp. Name your source code proj6-sequentialMain3.cpp
proj6-sequentialMain2.cpp:
int main() {
string name;
int age;
string choice = "yes";
while( choice != "no" ) {
cout << "What is your name? " << endl;
getline( cin, name );
cout << “How old are you? " << endl;
cin >> age;
cout << "Your name is: " << name << endl;
cout << "You are " << age << “ years old” << endl;
cout << "Do you want to read in another person (yes/no)? " << endl;
cin >> choice;
cin.ignore(3, '\n');
}
return 0;
}
proj6-modularMain2.cpp:
void readPerson( istream &in, string &name, int &age ) {
getline( in, name );
in >> age;
in.ignore(3, '\n');
}
void requestInfo( ostream &out ) {
out << "Please enter your name followed by your age." << endl;
}
void writePerson( ostream &out, string name, int age ) {
out << name << endl;
out << age << endl;
}
string readAgain( ostream &out, istream &in ) {
string choice;
out << "Do you want to read in another person (yes/no)? " << endl;
in >> choice;
in.ignore(3, '\n');
return choice;
}
int main() {
string name, choice;
int age;
bool fileRead = false;
ifstream pfile;
ofstream opfile;
cout << "Would you like to read the data from a file? " << endl;
cin >> choice;
cin.ignore(3, '\n');
if( choice == "yes" ) {
fileRead = true;
pfile.open("iperson.txt");
if( !pfile ) {
cerr << "Can't open person.txt for read." << endl;
return 1;
}
}
opfile.open("operson.txt");
choice = "yes";
if( fileRead ) {
readPerson( pfile, name, age );
if( !pfile ) {
choice = "no";
}
}
while( choice != "no" ) {
if( !fileRead ) {
requestInfo( cout );
readPerson( cin, name, age );
}
writePerson( opfile, name, age );
if( !fileRead ) {
choice = readAgain( cout, cin );
} else {
readPerson( pfile, name, age );
if( !pfile ) {
choice = "no";
}
}
}
if( fileRead ) {
pfile.close();
}
opfile.close();
return 0;
}In: Computer Science
I need this written in C # ASAP
Write a C# console program that continually asks the user "Do you want
to enter a name (Y/N)? ". Use a "while" loop to accomplish this. As long as the user enters
either an upper or lowercase 'Y', then prompt to the screen "Enter First and Last Name: " and
then get keyboard input of the name. After entering the name, display the name to the screen.
In: Computer Science
Story: The wide lens approach: Fixing the Blindspot
My organization implemented check-in kiosk to eliminate wait time in long lines. However, the problem is that the younger generation uses the kiosk more than the older generation?
The older generation prefers to wait in line. How do we fix the blind spot using Adner Strategy for Innovation?
Adner, R. (2013). The Wide Lens: A New Strategy for Innovation. London; Penguin Books. p. 219-229. ISBN 9781591846291
What would Adner: The Wide Lens author say to fix the problem of the older generation continuing to wait in line and avoiding the use of the kiosk?
In: Nursing
How and why do big cities attract big companies?
After reading "New Geography of Jobs" Forces of Attraction, it is very interesting as to why big cities like New York, Boston, San Francisco attract so many big companies to set their bases there. I share the confusion with the author, most companies in big cities have to pay higher wages to their employees because the expenditures for living is higher. It's not like you're going to get any information about your competitors if you set right beside them. Maybe there is a magical reason as to why these places attract big companies.
In: Economics
After the readings please think about reasons we need Scope and Practice Manuals and how you can relate transpersonal care to your clinical experiences.
Discussion questions:
Book : Holistic Nursing ,
chapter 2 Holistic Nursing : Scope and Standards of Practice
chapter 4 Transpersonal Human Caring and Healing
Author : Barbara Dossey & Lynn Keegan
APA format needed.
what other information needed ?
In: Nursing
Find four separate health care organization''s net worth terms in published news sources such as The Wall Street Journal or Business Week.
Comment on whether the net worth term you have found appear to be referring to for-profit corporations; for-profit sole proprietors or partnerships, or not-for-profit companies. What led you to believe this?
Through research identify the mission/vision statements of the four organizations you have identified. Discuss the pros and cons of each organization's for profit and not for profit status
If you were the author of these articles, would you have been more specific? If so, why? If not, why not?
In: Accounting
Store owners need an application that allows them to determine which books and movies they have rented. The application should save the general information of the borrowed items. The information of the book is: title, classification (genre), the number of pages and the author. The information in the second article is: title, duration, director and type of film. Do the necessary classes to represent the two articles. Each object in the classes must provide the following services: to show ask obtain change compare if two borrowed items are equal
1.All / part 2.Overloading of operators 3.Builder 4.Copy constructor 5.Destroyer 6. Dynamic memory
C++
In: Computer Science
6. The volcanic mountains of the Cascades are composed primarily of andesite. Andesite is an intermediate igneous extrusive rock. Why are the Cascades volcanoes composed of andesite rather than basalt?
7. The article describes how the accretion of the Siletzia terrane around 60 million years ago “.. managed to bring everything to a grinding halt. It literally stopped the subduction and shut off the arc!” What does the author mean when she says “shut off the arc”?
9. Most of the fossils recovered in Washington State are not older
than about 55 million years. Why do we not find older fossils in
this region?
In: Other
Elementary Statistics, 10th Edition, by Mario Triola; chapter 2, section 2-2, question 18, page 50:
Loaded die: the author drilled a hole in a die and filled it with a lead weight, then proceeded to roll it 180 times. The results are given in the frequency distribution in the margin. Construct the frequency distribution for the outcome you would expect from a die that is perfectly fair and unbiased. Does the loaded die appear to differ significantly from a fair die that has not been "loaded."
table for question 18:
Outcome: Frequency:
1 24
2 28
3 39
4 37
5 25
6 27
In: Math
3) Identify passages of John Keats’ Ode on a Grecian Urn that describe why all great works of art remain eternally “true,” and explain what the author means by making this claim.
4) How did the English artists John Constable and Joseph Turner differ in their approaches to painting natural landscapes? What did each of them want viewers to understand about nature?
5) Did American Romantic landscape painters wish to convey similar or different feelings about the natural world than European Romantic landscape painters? What are some examples of what makes their paintings similar or different?
In: Economics