Look at the following structure declaration:
struct Ful1 Name
{
string lastName;
string middleName;
string firstName;
};
Write statements that
A) define a FullName structure variable named info.
B) assign your last, middle, and first name to the members of the info variable.
C) display the contents of the members of the info variable.
Want to see the full answer?
Check out a sample textbook solutionChapter 11 Solutions
Starting Out with C++ from Control Structures to Objects (8th Edition)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Web Development and Design Foundations with HTML5 (8th Edition)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Java How To Program (Early Objects)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
- C++arrow_forwardDeclare a structure named TempScale, with the following members:fahrenheit: a doublecelsius: a doubleNext, declare a structure named Reading, with the following members:windSpeed: an inthumidity: a doubletemperature: a TempScale structure variableNow, define a Reading structure variable named today.Finally, write statements that will store the following data in the Reading structure variable.Wind speed: 37 mphHumidity: 32%Fahrenheit temperature: 32 degreesCelsius temperature: 0 degreesarrow_forwardC PROGRAMMING - STRUCTURE DEFINITION AND DECLARATION LESSON Declare an array of structures with 12 elements. Each element is a structure with three fields. The first field shows the month in numeric form (1 to 12). The second field shows the name of the moth. The third field shows the number of days in the month.arrow_forward
- a structure declaration does not declare a variable? true or falsearrow_forwarduse c code to develop a program In this program you will create a structure called class to hold the information of a class in Seneca college’s buildings. The information required for each class is as follows Campus name (like newham or Seneca@york) Building name (like Victor Phillip Dahdaleh Building) floor (like 1 2 3 4 5, …) class code (like DB2109) size of class (40 60 25) has projector (yes/no) has podium (yes/no) has whiteboard (yes/no) The following is the declaration of the structure Struct class{ Char campus[101]; Char building[101]; --- --- } Complete the above structure template based on the list of attributes provided Implement the followinggetClass function that receives a pointer to a vehicle and fills it up with user data. No user input validation is necessary. The user should be properly prompted for each field. Be careful with proper usage of . (dot) operator and -> (arrow) operator as this is the part of the code that gets the mark! void getClass…arrow_forward6. Write a structure declaration to hold the following data about a savig account. Give structure name as SavAcc. Account Number (string object) Account Balance (double) Interest Rate (double) Average Monthly Balance (double) Answerarrow_forward
- Write a function called inputReading that has a parameter to accept a Reading structure reference variable . The function should ask the user to enter values for each member of the structure.arrow_forwardneed code in C++ answer all parts Assume the Product structure is declared as follows: struct Product{string description; // Product descriptionint partNum; // Part numberdouble cost; // Product cost};1. Add two constructors to the Product structure declaration. The firstshould be a default constructor that sets the description member to the null string and the partNum and cost members to zero. The second con-structor should have three parameters: a string, an int, and a double. It should copy the values of the arguments into the description, partNum,and cost members.2. Define a print function as member of the struct that prints an object ofthis struct in the following format.Description: Claw Hammer PartNumber: 547Part Cost: $8.293. Declare an array of size 5 with pointers and named it ”items”. Initilize itwith user input values.4. Write a print function (not as a member of the struct) and pass a pointerto the pointer that points to the array(double pointer) and print all theitems of…arrow_forwardWhen constructing an instance of a structure, what kind of effects does using the new operator have?arrow_forward
- struct gameType { string title; int numPlayers; bool online; }; gameType Awesome[50]; Write the C++ statements that print out all gameType fields from Awesome whose numPlayers is > 1.arrow_forwardWhy should you use the new operator to generate instances of a structure?arrow_forwardC++ Movie Data Create a program that uses a structure named MovieData to store the following information about a movie: Title Genre Director Year Released Running time (in minutes) Write a program that prompts the user for input and allows all of these member data values to be specified. Make sure you input the entire title, genre, and director for the movie. You should also make sure that the year is inputted as a number, and that the running time is also a number. For the year it should be after 1887, and for the running time the number should be greater than 0. The program should create two MovieData variables and create/use a method void displayMovie(MovieData) to display the information about the movie in a clearly formatted manner.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr