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

  Explain the principles of electromagnetic radiation

Explain the structure and nature of the ionosphere with reference to daily, seasonal and long-term changes and explain the modes of propagation of radio waves of different frequencies

  Compare tha air gap mag filed produced bt 1 phase im

explian why a single phase IM is not self starting.descibe two ways that can make a single phase IM self starting compare tha air gap mag filed produced bt 1 phase IM and 3 pahse IM

  In december 2007 what at the time was the largest in north

in december 2007 what at the time was the largest in north america a solar voltaic power plant was activated at nellis

  Find an expression for the stroed engergy in terms of t

The current flowing through a 300-mH inductance is given by 5exp(-200t) A, in which time t is in seconds. A) Find an expression for the voltage in terms of t. B) Find an expression for the power in terms of t.

  How many expriments will be conducted on a given gas

in investigating the ideal gas law experiments are to be run at four different pressure and three different temperatures . A) How many exprimental conditions are to be studies B) If each experment is replicated 5 times how many expriments will be con..

  Find the gain kp necessary to meet the requirements

A proportional control system is to be used to control the wing flap of a jet airplane. The wind load is expected to cause as much as 600 in-lb of torque. The system should be able to keep the flaps with 5o of the set point.

  Draw the circuit for an rcd snubber circuit

Calculate maximum conduction losses when operating at maximum current and a duty cycle of 5% and design a gate drive circuit.

  Find the current supplied by the source

The values of the impendence, Rs = 50 Ω, Rc = 40 Ω, L = 20 μH, C = 1.25 nF, and the voltage applied to the circuit shown in the Figure, vs(t) = V0cos(ωt+0o), V0 = 10 V, ω = 6M(rad/s). Find the current supplied by the source

  Design combinational ckt that converts 4-bit gray to binary

Design a combinational circuit that converts a 4-bit gray codeto a 4-bit binary number. implement the circuit with exclusive-ORgates

  The circuit connected in series

The circuit connected in series

  What is the transmission of the receiver path

To identify the tank, you need to see what kind of barrel is on the tank and Is the beam diverging or collimated leaving the exit aperture of the system

  Determine frequency range of local oscillator for reciever

a) Determine the frequency range of the local oscillator for this receiver b) Analyze and explain whether it's possible for this reciever to receive both a diesred AM station and an image station within the same 31-meter band

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