Write a class coord that includes degrees and minutes

Assignment Help C/C++ Programming
Reference no: EM13937648

In ocean navigation, locations are measured in degrees and minutes of latitude and longitude. For example, 149 degrees 34.8 minutes west longitude, and 17 degrees 31.5 minutes south latitude, to be written as 149°34.8' W, 17°31.5' S. There are 60 minutes in a degree. Longitudes are measured from 0 to 180 degrees, east or west from Greenwich, England. Latitude is measured from 0 to 90 degrees, north or south from the equator to the poles.

Write a class Coord that includes the members: degrees (int), minutes (float), and the direction character (N, S, E, or W) to represent both latitude and longitude (altogether 6 members). The class must have a constructor accepting 6 parameters and a toString() method that returns a string representation of the coordinate as a C++ string (not C string).

The main () program must allow the user to enter the coordinates one-by-one, create the Coord object, and apply its toString() method for displaying. You can use hex character constant 'xB0' for printing the degree symbol (°).

Reference no: EM13937648

Questions Cloud

What is your portfolio return : Year-to-date, Yum Brands had earned a 4.40 percent return. During the same time period, Raytheon earned 4.93 percent and Coca-Cola earned −0.60 percent. If you have a portfolio made up of 40 percent Yum Brands, 40 percent Raytheon, and 20 percent Coc..
What is net present value of project : HealthWorks Inc, a chain of workout facilities, is looking at a new type of exercise equipment for all of its stores. The total amount of investment will be $250 today and the equipment is expected to last for 5 years with no salvage value. What is t..
What is the companies competitive advantage : What is the company known for doing very well?...not so well? (reputation), What does the future hold for your company? (future plans, expansion?contraction?) andWho are their customers? What is the companies competitive advantage?
Manager of a chain of print shops : You are the manager of a chain of print shops, CopyMAX, and have just received some good news from your corporate office. Next Thursday is Independence Day, and all of your 85 employees will be given a paid vacation day.
Write a class coord that includes degrees and minutes : The main () program must allow the user to enter the coordinates one-by-one, create the Coord object, and apply its toString() method for displaying. You can use hex character constant 'xB0' for printing the degree symbol (°).
Write a c++ code for sum of two large integers : Write a C++ code for sum of two large integers. User have to enter two integers one by one.
Require an increase in net working capital : McGilla Golf has decided to sell a new line of golf clubs. The length of this project is seven years. The company has spent $1796356 on research and development for the new clubs. The plant and equipment required will cost $28141541 and will be depre..
Prepare shareholders equity section of marbles balance sheet : On October 1, 2006, Marble Company had 400,000 shares of $2 par common stock issued and outstanding. Prepare the shareholders' equity section of Marble's balance sheet at September 30, 2007.
What is the companys expected growth rate : Kahn Inc. has a target capital structure of 50% common equity and 50% debt to fund its $10 billion in operating assets. Furthermore, Kahn Inc. has a WACC of 14%, a before-tax cost of debt of 11%, and a tax rate of 40%. What is the company's expected ..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Compute the squares of the numbers in the array

Write a java program to find the number in the given list. Write a java program to find the location of an element in the list.

  Write unique, simple function in c++

Write unique, simple function in C++. Be sure you provide code that calls the function also. Visual Studio

  Write a program to implement a simple batch operating system

Write a program C/C++ to implement a simple batch operating system. Develop a simple loader, scheduler, memory manager, and shell.

  Search for the value needle in the array

Search for the value needle in the array range given by [hay_begin ... hay_end), using the Linear Search algorithm. This function will return a pointer to the needle value if it is found, or a null pointer if needle is not found.

  Develop data structures - chord system

Develop data structures which are suitable to hold required information for each peer in a CHORD system. Note that index nodes can hold local information only

  Design and code a new function that accepts as parameters

design and code a new function that accepts as parameters the gross pay by value and the federal tax state tax local

  Prepare a program to find the area of a triangle

Write a program that prompts the user to enter three point (x1, y1), (x2, y2), (x3, y3) of a triangle and display its area.

  Programmingto compute the volume of water in the cubic feet

Write down an algorithm (Programming in C) in order to compute the volume of water in the cubic feet, flowing through a pipe of diameter d in feet, having a velocity of v feet per second.

  Would this code sequence compile? explain.

Using pseudocode or C++, write the statements to enter an integer number, compute the number raised to power 5 and output the result

  Provide a class diagram for every user authored class

Examine the sample code you have been provided with. This code is for a simple Car Hire management system. It contains a number of classes.

  Concepts of the object-oriented programming paradigm

Review structured programming concepts -  Describe the main concepts of the object-oriented programming paradigm.

  Display an error message and prompt the user again

Write an application that creates a quiz, which contains at least 5 questions about a hobby, popular music, astronomy, or any other personal interest.

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