The first will be a structure called point

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

In C++

create two structures. The first will be a structure called Point and will have as its data members an x and y coordinate. The second will be called Line and will have two Point structures as its data members.

The program should also have a function to getData from a user. The data will be two x and y coordinates. The program will then printData which will be the end points of a line.

For the purposes of this program, you can use the following as your main() function.

int main()

{

   Line   aLine;

   aLine.getData();

   aLine.printData();

   return 0;

}

Reference no: EM13161713

Questions Cloud

Delete all sub-directories within : Delete all sub-directories within "temp" directory if not empty. In Python program change the current working directory to [temp].
Program that reads a series of whitespace : Write a program that reads a series of whitespace delimited strings from stdin and prints them back out, separated by spaces, in lexicographic order. You may assume that all strings are lower case and that no string has more than 20 characters.
The graphics frame class and the drawable interface : This lab makes use of the GraphicsFrame class and the Drawable interface. Your missions is to create the class Airplane.
After the array is created and loaded : After the array is created and loaded, the problem is then to sort the array and print out the contents of the sorted array. Please use a separate function for the sort routine and also a separate function for the print out of the array.
The first will be a structure called point : Create two structures. The first will be a structure called Point and will have as its data members an x and y coordinate. The second will be called Line and will have two Point structures as its data members.
Sorting routine adopted in the java api for arrays.sort()? : What is the sorting routine adopted in the Java API for Arrays.sort()? How different is it from the sorting routine we discussed in class? Is it better? Explain your answers in short clear sentences.
Develop a class airborne location : develop a class AirborneLocation that represents the location of airplanes with respect to a reference radar location. Each AirborneLocation object should include data member for aircraftID (integer),
Write a recursive method to reverse a string. : write a recursive method to reverse a string. Explain why you would not normally use recursion to solve this problem?
What is the goal of information systems planning? : What is the goal of information systems planning? What are the steps of the traditional systems development life cycle? What is prototyping? What is an RFP? What is typically included in one? How is it used?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create a template class

Create a template class, SVector, that implements a constructor

  Takes a string containing a full name

Write a program that takes a string containing a full name and outputs each part of the name separately with its length. The name should be in the form of first, middle, and last name, separated from each other by a single space. For example, if the ..

  Write a program that will be used to gather statistical data

Write a program that will be used to gather statistical data about the number of movies

  Write a program to calculate existing angles

Write a program to calculate existing angles and do if and then from this, and to place fixed angles at certain position.

  Write a program that skip s leading whitespace character

a) Write a program that skip s leading whitespace character s in each line of the pro vided data file CPPHumor .txt . Save the results in a new file

  Write function to accept character array

Write down the C++ function which will accept the character array of at most 30 cells. Your function must return true if string and its reverse are identical;

  Basics of code development on linux and cryptography

Prepare a C program that gives simple mono-alphabetic substitution between plaintext, and Enhance your code to use "-e" to encrypt a string argument and "-d" to decrypt it using argv and argc

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Implement a semantic analysis

The program will implement Semantic Analysis. The assignment provides two options to define variable scope, either using the Global Option or the Local Option.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  C program to calculate power loss in transmission line

Write program in C to calculate the power loss in transmission line with resistance of 0.05 ohms/mile. Calculate power loss if 500 kW of power is transmitted from power generation station

  Write a program that reads from a file a list of course name

Write a program that reads from a file a list of course names, letter grades for each course and number of credits each course is worth. The program will read each course name, grade earned and number of credits from the file and print out the course..

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