Add a member function to print out all the information

Assignment Help Computer Engineering
Reference no: EM132196945

Write a C++ program:

Write a class to contain the following information about towns: the name (a sequence of characters); the population (an integer); and a Boolean value (i.e. true or false) which indicates whether the town has an airport or not.

Make the three data members private. Include a constructor that initialises the data members.

And Now add three new member functions to the towns class that assign values to the three data members.

Also add a member function to print out all the information about a town. The member functions should all be publicly accessible.

Write a main() function which declares three town objects and assigns the following values to them:

Name: London Manchester Liverpool
Population: 1 000 000 50 000 35 000

Airport: True True False

After assigning values to the three objects, the program should print the details of thoose three to the screen.

Reference no: EM132196945

Questions Cloud

Determine the mean and standard deviation of distribution : Determine the mean and standard deviation of this distribution. The quality control manager of Marilyn's Cookies is inspecting a batch of chocolate-chip cookies
What will be the form of the contract curve : Let's suppose we are in an exchange economy with two agents, with a contract curve going through the point (4,8). The Edgeworth box is a square.
How does the fomc evaluate the balance of risks : In current (2018) business publications or on the Federal reserve web site (www. federalreserve.gov), find the press release from the most recent meeting.
Determine how much is the final payment : A company wants to replay a $118,155 debt making $271 quarterly payment for 27 quarters, then one final payment. If the interest is 5.5 per year.
Add a member function to print out all the information : Add a member function to print out all the information about a town. The member functions should all be publicly accessible.
What is the total amount of time supplied to the market : What is the total amount of time supplied to the labor market (that is, what is the total amount of time supplied to the market by all 10 individuals)?
Write a void function named sort with two args : Write a C Program: Using qsort, write a void function named sort with 2 args an unsigned that is the number of elements in the array.
Compare the content of the quantity variable to the number : Write the C++ if statement that compares the content of the quantity variable to the number 10.
Determine the type of triangle for the given lengths : Write a program that determines the type of triangle for the given lengths of the sides the triangle does not exist.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe the administrative management practices

Describe the administrative management practices of separation of duties, job rotation, and mandatory vacations and their role within

  How the given systems-enabled tasks are performed

Write a 350- to 525-word description of your use of technology systems in your current or past jobs. If you have no personal experience to draw from.

  Write a program to assign passaengers seats in an airplane

Write a program to assign passaengers seats in an airplane. Assume a small airplane with seat numbering as follows.

  Describe computer algorithms and its significance

Explain computer algorithms and its significance. Explain some of the technologies that have contributed to the exponential growth of the Internet and the World Wide Web (WWW).

  Write an ascii character counter for an array in mips

The starting address of the array of ASCII characters must be passed to the subroutine in $a0.

  What is the purpose of the hidden control view state

What is the purpose of the hidden control View State? How can an ASP.NET checkbox control be forced to cause a post back when it is checked?

  Define what part of a security incident should be logged

What are some of the symptoms that would make you suspicious that your computer has been attacked

  Describe software construction

Describe software construction

  Create an application that produces three different outputs

Create an application that produces three different outputs using the same phrase. Select your own favorite popular saying for the phrase.

  Analyze firewire using the value chain and competitive

firewire surfboards light up with cadnev hyman had been building surfboards in australia for 35 years. in 2005 he

  Why didn''t the vendor just bid fewer disks

Why didn't the vendor just bid fewer disks

  Identify each of the standard code sets for diagnoses

Identify and briefly describe each of the standard code sets for diagnoses, laboratory tests, procedures, medications and clinical reasoning including the purpose of the codeset.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd