C++ Program
Create a program that will prompt for user information for a Web site. Use a structure to store the data. The structure will need to include the following items:
- First Name - string
- Last Name - string
- Full Name - string
- Birth Date - int (assume format yyyymmdd)
- IsLeasingAutomobile - bool
- yearlySalary - float
Create a single structure from the items listed above.
Prompt for all items except "Full Name" and load the input directly into a variable based on this structure .
After the data is loaded, pass the structure by reference to a method called "loadFullName". Inside the "loadFullName" method, load the Full Name data item with a string that is a combination of First Name, space, Last Name. The full name must be converted to uppercase. After the loadFullName has executed, display the value of all the data items in the variable structure. See Section 6-13 on how to pass a parameter by reference.
R
eview of tasks:
a. Create User Structureb. Assign a Variable to a User Structureb. Load the Variable Structure Datac. Pass the Variable Structured Data to "loadFullName"d. Display the values of the variable structure.
Note:Input for a boolean var is 0 for false and 1 for true. Adding this line to display once will help display the word false or true in the output.std::cout << std::boolalpha; cout << "is Leasing = " << VarStrucName.isLeasingAutomobile << endl; // will display true or false - with not 0 being true
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- True or False Before you can use the structure to store data, you must create an instance of the structure in memory.arrow_forwardDescriptión Instructions Timed Test This test has a time limit of 30 minutes.This test will save and subr Warnings appear when half the time, 5 minutes, 1 minute, and 3 Multiple Attempts Not allowed. This test can only be taken once. Force Completion This test can be saved and resumed at any point until time has exp Remaining Time: 08 minutes, 03 seconds. * Question Completion Status: A Moving to another question will save this response. Question 5 What type of structure allows you to repeat a set of instructions multiple times? O a. sequence O b. loop O c. decision O d. nested A Moving to another question will save this response. 15 7 10 % & 4.arrow_forwardProgram language C: I need to display three columns named a, b, and c. There can be 12 rows.arrow_forward
- Differentiate between code included inside a sequence structure and code contained within an if structure. Answer:arrow_forwardA Last In First Out (LIFO) data structure is a data structure in which the item that is added last will be removed fırst. True Falsearrow_forwardFor what reason should you use new instead of the old operator when creating instances of a structure?arrow_forward
- Design a "Car Rental" Visual C# application, which allows the user to search for and book a car rental. It is required to create a database file that contains at least three related tables, the first of which contains the cars data with the data fields, such as: car ID car type car model quantity on stock cost per day Make up at least five records in the first table and save your database file in the default folder of your project. The second table should contain the customer information, such as: customer ID first name last name telephone number credit card data The third table should contain the bookings data, such as: booking ID car ID customer ID pick-up date drop-off date total cost Please note that you can create more tables as well as add more data fields, if necessary. Your program should contain multiple Windows forms as follows: The first form will enable the user to search for a car rental. If a car rental is selected, the second form may provide more into about the car that…arrow_forwardDifferentiate between code included inside a sequence structure and code contained within an if structure. Answer:arrow_forwardGame of Hunt in C++ language Create the 'Game of Hunt'. The computer ‘hides’ the treasure at a random location in a 10x10 matrix. The user guesses the location by entering a row and column values. The game ends when the user locates the treasure or the treasure value is less than or equal to zero. Guesses in the wrong location will provide clues such as a compass direction or number of squares horizontally or vertically to the treasure. Using the random number generator, display one of the following in the board where the player made their guess: U# Treasure is up ‘#’ on the vertical axis (where # represents an integer number). D# Treasure is down ‘#’ on the vertical axis (where # represents an integer number) || Treasure is in this row, not up or down from the guess location. -> Treasure is to the right. <- Treasure is to the left. -- Treasure is in the same column, not left or right. +$ Adds $50 to treasure and no $50 turn loss. -$ Subtracts…arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY