Write a main function that inputs three points from the user

Assignment Help Computer Engineering
Reference no: EM132208472

Write a program in C++:

Write a class called Triangle. A triangle consists of 3 points. The Triangle class should have one default constructor and another constructor that initialises the three points of the triangle. It should also have a member function that calculates the area of the triangle according to the formula

Area = sqrt(s*(s-a)*(s-b)*(s-c))

where a, b and c are the lengths of the three sides, and s is half of the sum of the three sides. Write a main function that inputs three points from the user, and prints out the area of the triangle they form.

Reference no: EM132208472

Questions Cloud

Write a program that contains a for loop : Write a program called SeriesOfNumbers.java that contains a for loop that produces the following output:
What were the consequences of first industrial revolution : What were the consequences and causes of the first industrial revolution? And what were the causes and consequences of the second industrial revolution?
Convert the 16-bit bcd variable in memory locations : Write a program called UNPACK to convert the 16-bit BCD variable in memory locations 0x0150 and 0x0151 to four ASCII characters.
What is equilibrium weekly leisure time and weekly income : What is his equilibrium weekly leisure time and weekly income? What percentage of his total time does he work? If the government taxes his wage only at 20%.
Write a main function that inputs three points from the user : Write a class called Triangle. A triangle consists of 3 points. The Triangle class should have one default constructor and another constructor that initialises.
What does your reply say about the trade-off : Is it possible for a more equal income distribution today to lead to higher GDP per capita in the future? How? What does your reply say about the trade-off.
Calculate and print the bill for cellular telephone company : Write a program that calculates and prints the bill for a cellular telephone company. The company offers two types of service: regular and premium.
Accept one string argument and returns the reverse : A recursive function called printReverse that accepts one string argument and returns the reverse of that string.
Simulate the rolling of a pair of dice 1000 times : Write a program that calls a method RollDie that simulates the rolling of a pair of dice 1000 times. Use an array of size 11 to keep track of the rolls.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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