Write a c++ program that sets up a class sailboat

Assignment Help Electrical Engineering
Reference no: EM131021712

To Write a c++ program that sets up a class sailboat containing private data for a boat's manufacturer and name, length, beam (width), and draught (water depth required to float the boat) . The class has Set functions for all data as well as WriteInfo that reports all the Sailboat object data to the screen. One boat is greater than another if it is longer. If the boats are the same length , then the larger beamed boat is bigger.

Create a data file of a boat called "boat.txt" so that first line is the total number of boats in the file; the next three lines are the manufacture; followed by the name; and then the boat length, beam, and draught. For example:

3

McGregor 25

The Sparkly Lady

25 8 3.5

Victoria

WayLay

18 6 3

Hobie

Lazy Days

In main, call ReadFile, which open your data file and fill your Sailboat array with the boat data from the file. It returns a true if it found the file and read successfully, a false if it could not open the file, Report any file problem from main. If the array was filled, show the boat information in the order of the data file (unsorted).

Reference no: EM131021712

Questions Cloud

Describe in detail the unique needs of the population : Describe in detail the unique needs of this population. Conduct additional research to expand on the material covered by the text. Compare these needs with those of other populations served by the human services field.
What is the percentage change in the price of these bonds : Bond J has a coupon rate of 4.4 percent. Bond S has a coupon rate of 14.4 percent. Both bonds have twelve years to maturity, make semiannual payments, and have a YTM of 9.8 percent. If interest rates suddenly rise by 2 percent, what is the percentage..
Would decision to raise price evidence of explicit collusion : Suppose there are four large manufacturers of toilet tissue. The largest of these manufacturers announces that it will raise its prices by 15 percent due to higher paper costs. Within three days, the other three large toilet tissue manufacturers a..
What is saving function as function of disposable income : What is the saving function as a function of disposable income? What is the consumption function as a function of aggregate income
Write a c++ program that sets up a class sailboat : Report any file problem from main. If the array was filled, show the boat information in the order of the data file (unsorted).
Preferred stock outstanding that pays a dividend : N.E. Incorporated has preferred stock outstanding that pays a dividend of $5 at their end of each year, the preferred sells for $50 a share. What is the required rate of return (assume the market is in equilibrium with the required return equal to th..
What is the present value of all future payments : Bridget Jones has a contract in which she will receive the following payments for the next five years: $23,000, $24,000, $25,000, $26,000, and $27,000. She will then receive an annuity of $29,000 a year from the end of the 6th through the end of the ..
Is this price-fixing fair-ethical and socially responsible : Assume you are a businessperson with an opportunity to make more money by meeting with competitors and fixing prices, conduct which is illegal. The authorities will not discover that the prices have been fixed. Is this price-fixing fair? Ethical? Soc..
Explain the us reaction to the collapse of the soviet union : Explain the United States's reaction to the collapse of the Soviet Union? Discuss the Clarence Thomas supreme court nomination and its effects on the court and on race relations.

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Lithium ion battery technology

The paper includes Lithium ion battery technology with its advantages and disadvantages. The paper discusses about the Lithium air battery in which detailed reactions of Lithium with air including nonaqueous as well as aqueous are given.

  Power transformers and tariffs

Construction of different types of power transformer, significant energy savings

  Paper on orthogonal frequency-division multiplexing

This document is shown a paper on Orthogonal frequency-division multiplexing with advantages, disadvantages and uses.

  Function of the hmi in a scada system

This assignment contains electronics engineering questions like State the commonly found components of a SCADA (Supervisory control and data acquisition) system. and decribe the function of the HMI in a SCADA system.

  Resultant waveform of the odd harmonic series

Prepare an Excel graph showing the individual components and summated resultant waveform of the odd harmonic series resulting in an approximate square wave.

  Explain scada system

Explain the function of the HMI in a SCADA system.

  Design a 2-digit 24 second shot-clock

Design a 2-digit 24 second "shot-clock" countdown timer with pushbutton controller.

  Model a discrete-time system

To understand di erent signal models To be able to model a discrete-time system and design simple signal processing algorithms.

  Draw a relay construction diagram

Draw a relay construction diagram and briefly explain the operation of a relay.

  Frequency division multiplexing

Write a short technical report on Frequency Division Multiplexing

  Impact of electron energy

Briefly discuss the impact of electron energy, electron current and target on the Bremsstrahlung generated.

  Traffic light controller

The schematic of the traffic light controller

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