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

  Calculate the minimum pwm frequency for a dc motor

Calculate the minimum PWM frequency for a small permanent magnet DC motor with a time constant of 15 milliseconds.

  Draw the schematic for a 3-bit combinational multiplier

(Combinational Integer Multiplier) Draw the schematic for a 3-bit com- binational multiplier designed using partial product accumulation. (A,B are 3-bit inputs and S is a 6-bit output.) Use half/full adders in addi- tion to logic gates to build th..

  How many unit cells in series must battery use to have volts

The battery is built by connecting several unit cells in series. Each unit cell has the voltage V1=1.4 V and the internal resistance Ri = 3.2 Ohm; 1) How many unit cells in series must the battery use to have the open-circuit voltage Vo.c. = 11.2 V

  Calculate a-phase line current and a-phase line voltage

A Balanced Three-Phase Circuit is Characterized as follows: Y-Δ Connected Source Voltage in B-phase is 20

  What is the use of the carry output in parallel load counter

What is the use of the carry output in a parallel load counter If l have a 3 bit binary parallel load counter do l connectthe count input,and the outputs (Q) from the three flip flops

  Describe the global set-reset function in the spartan fpga

FPGAs are programmed from a compiled HDL description (i.e., a Verilog or VHDL program). What would you have to have in the HDL description to use the global set/reset function in the Spartan FPGA

  Explain using diagram

If L=0.0053nH, C=15µF find the operating frequency of series LC circuit. What factors decides capacitance? Explain using diagram.

  Insulate the line from the supporting system

·Insulators are a vital part in transmission system they held the overhead transmission line and provide a mechanical support besides they act as an electrical insulator to insulate the line from the supporting system ( pole, tower...etc.)

  Determine the new voltage rating and the new kva rating

The transformer is to be used on a 50 Hz system, with the restriction that it maintain the same maximum core flux and the same total losses. Determine (a) the new voltage rating; (b)the new kVA rating.

  Estimate of how to divide the amount of the project goal

the project manager on a development project working on a new line of laptop computers. The project has been broken down into the following modules: Power supply, Processor and motherboard with RAM, I/O circuit board

  Find the solution for the equation

Please Use Mesh analysisy to find the solution for the Equation  with a Step by Step Summary of Supermesh AnalysIS

  Find input power to the circuit from the source at frequency

A 120V(rms), variable-frequency source is connected in series with a 100Ω resistor and 100μF Capacitor. Find the input power to the circuit from the source at the frequency where the power factor of thr load is 0.75.

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