1. Create a function named void testStruct02C() 2. Declare a FootballTeam struct pointer 3. Using cin...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create a function named void testStruct02C() 2. Declare a FootballTeam struct pointer 3. Using cin and getline(), initialize the FootballTeam fields using the pointer Can use a statement like Football Team* fb01 = {"Buffalo Bills", "New York Jets", 33, 21); 4 Print out the Football Team struct using the pointer fb01 5 Fb01= returnStructPointer() 6 Print out the Football Team struct again using the pointer fb01 7. the first time you printed out fb01 (line 4) will be different than The output from printing fb01 (line 6) 8. the output printed in the function returnStructPointer() should be the same as the output from line 6 a function was added that you will need to modify named Football Team* returnStruct Pointer() { Declare a FootballTeam struct pointer named fb02 Using cin and getline(), initialize the Football Team fields using the pointer with different values than were used in initializing fb01 in function void testStruct02C() Can use a statement like Football Team fb02= ("Buffalo Bills", "New York Jets", 33, 21); Print out the Football Team struct using the pointer fb02 return the pointer to the calling function void testStruct02C() 22 RS #include... 25 using namespace std; 26 /************ struct definition 27 28 29 38 32 33 34 35 36 37 29 51 50 56 27 struct Football Tean { }; void teststruct82c(); 38Football Team returnStruct(); . Libraries here int main() { . . . . string tean; // tean name string opponent; // opponent name int teamscore; // teams score int oppoScore; // opponents score it should be the save as the struct printed in the called function teststruct82c(); return 0; creates gand initializes Football Team object creates a Football Team pointer makes the pointer point to the struct prints the object out (using the pointer) calls Football Teas returnStructPointer () which returns another Football Team pointer prints the object out using the new pointer void teststruct82c() II create a Football Teas struct void teststruct82c() { e} // create a Football Team struct // print out the Football Team struct // call returnstruct and receives struct pointer // print out the Football Team struct finction creates, initializes prints a Football Team struct then returns the struct ************ Football Tean returnStruct() // create a Football Tean object // initialize the fields // print out the FootballTean struct //return the pointer 1. Create a function named void testStruct02C() 2. Declare a FootballTeam struct pointer 3. Using cin and getline(), initialize the FootballTeam fields using the pointer Can use a statement like Football Team* fb01 = {"Buffalo Bills", "New York Jets", 33, 21); 4 Print out the Football Team struct using the pointer fb01 5 Fb01= returnStructPointer() 6 Print out the Football Team struct again using the pointer fb01 7. the first time you printed out fb01 (line 4) will be different than The output from printing fb01 (line 6) 8. the output printed in the function returnStructPointer() should be the same as the output from line 6 a function was added that you will need to modify named Football Team* returnStruct Pointer() { Declare a FootballTeam struct pointer named fb02 Using cin and getline(), initialize the Football Team fields using the pointer with different values than were used in initializing fb01 in function void testStruct02C() Can use a statement like Football Team fb02= ("Buffalo Bills", "New York Jets", 33, 21); Print out the Football Team struct using the pointer fb02 return the pointer to the calling function void testStruct02C() 22 RS #include... 25 using namespace std; 26 /************ struct definition 27 28 29 38 32 33 34 35 36 37 29 51 50 56 27 struct Football Tean { }; void teststruct82c(); 38Football Team returnStruct(); . Libraries here int main() { . . . . string tean; // tean name string opponent; // opponent name int teamscore; // teams score int oppoScore; // opponents score it should be the save as the struct printed in the called function teststruct82c(); return 0; creates gand initializes Football Team object creates a Football Team pointer makes the pointer point to the struct prints the object out (using the pointer) calls Football Teas returnStructPointer () which returns another Football Team pointer prints the object out using the new pointer void teststruct82c() II create a Football Teas struct void teststruct82c() { e} // create a Football Team struct // print out the Football Team struct // call returnstruct and receives struct pointer // print out the Football Team struct finction creates, initializes prints a Football Team struct then returns the struct ************ Football Tean returnStruct() // create a Football Tean object // initialize the fields // print out the FootballTean struct //return the pointer
Expert Answer:
Answer rating: 100% (QA)
include Structure definition struct FootballTeam stdstring team stdstring opponent int teamScore int ... View the full answer
Related Book For
Posted Date:
Students also viewed these algorithms questions
-
1. discuss the broad problem you intend to research; share what the client thinks about the issue and detail whether and how you may be able to accurately clarify and state the problem you intend to...
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
How would your answers in Problem 48 change if partnership revenues were $100,000 instead of $150,000? Data From Problem 48: The KL Partnership is owned equally by Kayla and Lisa. Kaylas basis is...
-
Air in a tank is at 1 MPa and room temperature of 20C. It is used to fill an initially empty balloon to a pressure of 200 kPa, at which point the diameter is 2 m and the temperature is...
-
The following are independent situations. a. A new company is formed and sells 100 shares of $1 par value stock for $12 per share to investors. b. A company purchases for $18,000 cash a new delivery...
-
Your colleague is excited about your good fortune (Problem 3.1) at work, but she only got the promise of a watch or \($300\) cash. You convince her that she will be better in the long run by just...
-
The procedures used for over-the-counter receipts are as follows. At the close of each days business, the sales clerks count the cash in their respective cash drawers, after which they determine the...
-
Sweeten Company had no jobs in progress at the beginning of March and no beginning inventories. The company has two manufacturing departments-Molding and Fabrication. It started, completed, and sold...
-
Why should k' have nearly the same value for each of the above reactions? Table A3 - Determination of the Relative Rate Constant, k' Mixture 1 2 3 Average k' = %3D 0.27906977 0.31914894 | 0.25 0.3...
-
Assume that the Securities and Exchange Commission (SEC) has a rule under which it enforces statutory provisions prohibiting insider trading only when the insiders make monetary profits for...
-
Assume the central bank increases the quantity of money by 25%, even though the economy is initially in both short-run and long-run macroeconomic equilibrium. Describe the effects, in the short run...
-
Superior Wholesale Corporation planned to purchase Regal Furniture, Inc., and wished to determine Regals net worth. Superior hired Lynette Shuebke, of the accounting firm Shuebke Delgado, to review...
-
In the economy of Scottopia in 2014, exports equaled $400 billion of goods and $300 billion of services, imports equaled $500 billion of goods and $350 billion of services, and the rest of the world...
-
A McDonalds Happy Meal consists of an entre, a small order of French fries, a small drink, and a toy. In the early 1990s, McDonalds Corp. began to aim its Happy Meal marketing at children aged one to...
-
Consider the following narrative: We Keep You On Time (WKYOT) is a small chain of about twenty watch-repair shops located in major metropolitan areas in the eastern part of the United States. WKYOT...
-
Players A, B, and C toss a fair coin in order. The first to throw a head wins. What are their respective chances of winning?
-
If the word variable contains the string Bells, which of the following statements will change the contents of the variable to Bell? a. word.erase(word.length() 1, 1); b. word.replace(word.length() ...
-
In this exercise, you will modify the code from Exercise 10. If necessary, create a new project named ModifyThis11 Project, and save it in the Cpp8\Chap08 folder. Enter (or copy) the TryThis10.cpp...
-
In this exercise, you will create a program that converts U.S. dollars to a different currency. The number of American dollars should always be an integer that is greater than or equal to zero. The...
-
Consider the following time series data. a. Construct a time series plot. What type of pattern exists in the data? b. Show the four-quarter and centered moving average values for this time series. c....
-
Refer to exercise 35. a. Deseasonalize the time series using the adjusted seasonal indexes computed in part (c) of exercise 35. b. Using Minitab or Excel, compute the linear trend regression equation...
-
The following table reports prices and usage quantities for two items in 2009 and 2011. a. Compute price relatives for each item in 2011 using 2009 as the base period. b. Compute an unweighted...
Study smarter with the SolutionInn App