Computers and Technology

Lab 2.2 struct to classUtilizing the code in 2.1, convert your struct to a class with private data. Use new to allocate space on the heap for your object. You will need to provide complete object oriented code to support your program. That means a class, default constructor, constructor taking five arguments, mutators (setters), accessors (getters), a destructor plus input and output functions. Refer back to airfreight. doc or airfreight. docx for helpful information. In main, create a load object on the heap using the default constructor. Output the contents of the object. Using your input function, set the data up for your object using the following information:uld – Container abbreviation - AYFuldid – AYF97326IBaircraft - 737weight - 1710destination – SMFIn the input function, utilize mutators to set up your dataDestroy your unit object using delete; put a cout to verify the deletionHints:Pass your object from main by reference. This allows your input and output functions to work muchmore easily. You will need this in later labs. Your output should look like this (your output data is different, of course) Unit load type: Pallet
Unit load abbreviation: PMGUnit identifier: PMG12345IB
Aircraft type: 737Unit
weight: 1257
Destination code: SJC
Cargo destructor called

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:30, elizabethburkha
Which text format is this, "the text is transcribed exactly as it sounds and includes all the utterances of the speakers. "?
Answers: 2
image
Computers and Technology, 23.06.2019 02:50, bfell92
There’s only one game mode that stars with the letter β€˜e’ in cs: go. which of the options below is it?
Answers: 1
image
Computers and Technology, 23.06.2019 04:31, hargunk329
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, kodak0531
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
Do you know the correct answer?
Lab 2.2 struct to classUtilizing the code in 2.1, convert your struct to a class with private data....

Questions in other subjects:

Konu
Mathematics, 10.11.2020 17:00