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

  Write a program that asks the user to enter the names of 3

Write a program that asks the user to enter the names of three salesmen. The program should thenaccept the sales produced for salesman for each quarter of the year. Display the name, and the totalsales amount, of each salesman.

  Implement a simplified version of the set class

You will implement a simplified version of the set class. You must implement all functions defined in the provided file set.h. You may add other member functions and variables as necessary.

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  Iterative programming problem solving approaches

Write a recursive function void reverse ( ) that reverse a sentence

  Prepare an accounting for a dorm''s kitchen

The "purpose" of the program is to prepare an accounting (database) for e.g. a dorm's kitchen, to keep track of the consumption of beer for each room.

  Initialize an array and fill the array with the gpa values.

Write a program in java that asks user input (using a loop) for name of 10 student and the corresponding grade point averages (GPAs). Initialize an array and fill the array with the GPA values.

  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

  Three or more dimensions

What kind of program, or problem, might necessitate arrays of three or more dimensions?

  The two-dimensional array

1. Given the two-dimensional array declared by the following statement int myArray[4][3] = {{2,4,6},{1,8,10},{3,5,7},[9,11,13}}; what is the value of myArray[1][2]

  Illustrate example from ansi c programming language

Illustrate example from ANSI C programming language, without using nested procedures, to show the fact that "assignment-by-sharing in conjunction with quasi-dynamic object binding

  Reads in a list of integers

Write a program in C++ that reads in a list of integers into and array with base type int. Provide the facility to either read this array from the keyboard or from a file, at the user's option. If the user chooses file input, the program should reque..

  Make 2-dimensional array

make 2-dimensional array a bit of life and bringing them from the abstract to the concrete realms

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