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

  Create a program that maintains the required book catalog

Create a program that maintains the required book catalog for the circulation desk of a library.

  Write a complete program to calculate monthly payment

Write a complete program to calculate monthly payment - Your task as a programmer is to create a menu driven program. Your program must-reads from already existing data file which contains the unknown number of records.

  Null pointer problem

What is the only thing that you should ever do with the NULL pointer? In the following declaration, explain what type p is, and describe how it might be used.

  Calculates the factorial value of its single int parameter

Write a method called fact that recursively calculates the factorial value of its single int parameter.

  Write c program for linked list applications

Write a complete C program which illustrates the Linked list applications data structures and algorithms. The program will read in mid-semester test scores as Main Linked List and produce six outputs:

  Design a simple atm service kiosk

Design a simple ATM service kiosk. This kiosk supports the following options for its menu: 1. Viewing your account balance2. Depositing cash3. Withdrawing cash

  Write a pseudocode function in terms of adt appointment

Write speci?cations for a method within Date that advances any given date by one day. Include a statement of purpose, the preconditions and postconditions, a description of the arguments, and a description of any return value.

  Cashregister class that can be used with the retailitem clas

Write a CashRegister class that can be used with the RetailItem class that you wrote in Part 1. The CashRegister class should simulate the sale of a retail item. It should have a constructor that accepts a RetailItem object as an argument.

  Problem related to permutation

Write a recursively function that generates all the permutations of a set of numbers. Use the STL set class for all set operations and the STL linked list class to store and manipulate each individual permutation. When creating a set containing li..

  Reads a line of characters from the user

Write a segment of code (not an entire program) that reads a line of characters from the user and outputs "too long" if the user enters more than 5 characters (not counting hitting the enter/return key).

  Write a loan calculator program

Write a loan calculator program in C++ that displays monthly balances for user-specified loan terms. To be flexible, you decide to specify the loan terms in a file and provide that filename  entered from the keyboard. To keep things simple

  What are the contents of the array

What are the contents of the array after the subsequent loops complete - loops and also provide the iteration how to get it.

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