Design the class line type to store a line

Assignment Help JAVA Programming
Reference no: EM13881061

The equation of a line in standard form is ax + by ¼ c, wherein both a and b cannot be zero, and a, b, and c are real numbers. If b 6¼ 0, then -a/b is theslope of the line. If a ¼ 0, then it is a horizontal line, and if b ¼ 0, then it isa vertical line. The slope of a vertical line is undefined. Two lines areparallel if they have the same slope or both are vertical lines. Two lines areperpendicular if either one of the lines is horizontal and the other is verticalor the product of their slopes is -

1. Design the class lineType to store aline. To store a line, you need to store the values of a (coefficient of x), b(coefficient of y), and c. Your class must contain the following operations.

a. If a line is nonvertical, then determine its slope.

b. Determine if two lines are equal. (Two lines a1x + b1y ¼ c1 and a2x +b2y ¼ c2 are equal if either a1¼ a2, b1¼ b2, and c1¼ c2 or a1¼ ka2,b1¼ kb2, and c1¼ kc2 for some real number k.)

c. Determine if two lines are parallel.

d. Determine if two lines are perpendicular.

e. If two lines are not parallel, then find the point of intersection.

Reference no: EM13881061

Questions Cloud

Rate of heat transfer to the water : If the tube surface temperature is Ts = 350 K and the gas-side convection coefficient is hg = 30 W/m2 · K, what is the rate of heat transfer to the water per meter of pipe length?
What fares should the airline charge : What fares should the airline charge, and how many passengers will buy tickets of each type? Remember that maximum revenue is obtained by setting MRB equal to MRE
Differences between groups and teams how do we convert : Let's discuss the differences between groups and teams. How do we convert a group to a team? What benefits might come from this conversion in a business environment?
Determining the outlet temperature of the process fluid : Estimate the outlet temperature of the process fluid. Tm,o. Assume, and then justify, fully developed flow and thermal conditions within the tube.
Design the class line type to store a line : Design the class lineType to store aline. To store a line, you need to store the values of a (coefficient of x), b(coefficient of y), and c. Your class must contain the following operations.
What are fundamental and non-egoistic theories of ethics : What are two fundamental, non-egoistic, classic normative theories of ethics? [HINT: Kantian deontology and Millsian utilitarianism] Provide a general characterization of each of these perspectives and correlate them with Kant and Mill
Function of tube diameter for the three flow rates : Plot the pressure gradient as a function of tube diameter for the three flow rates. Assume the tube wall is smooth.
Find the optimal price by hand : Treating price as the relevant decision variable, create a spreadsheet (based on the example shown) to model this setting. Compute the price elasticity in cell B12 according to EP = (dQ /dP)(P/Q ).
How does global context influence type of global knowledge : How does global context influence the type of global knowledge and competencies needed for successful global leadership

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a recursive instance method

Write a recursive instance method

  Write applet which reads five numbers-draw equivalent stars

Write the applet which reads five numbers (each between 1 and 30). For each number read, your program must design line containing that number of adjacent asterisks.

  Write a java application that reads a file containing text

Write a Java application that reads a file containing text. Your program should read each line and display it on the console screen preceded by line numbers.

  Negative subarrays

Write a program that displays the "Negative subarrays".Note: Subarrays are contiguous chunks of the main array. For example if the array is {1,2,3,5} then some of the subarrays are {1}, {1,2,3}, {2,3,5}, {1,2,3,5} etc. But {1,2,5} is not an subarray ..

  Create a query that lists the number of appointments

Create a query that lists the number of appointments for each doctor by day. Display the number of appointments, the doctor ID, and the appointment date. Display the output in order of doctor ID with the lowest doctor ID first.

  Design and implement a small and simple email server using

design and implement a small and simple email server using the concept of web based information system wbis. your

  Converting pseudocode to javascript

I would need help in converting converting pseudocode to JavaScript. I already have the pseudocode in a html file but need it to be converted to JavaScript and run like it should.

  How to compile and debug your work

You will be writing a Java program to allow people to play the 24-puzzle (the obvious variant where the frame is 5x5) puzzle) in a text based context. My goal is that you recall how to enter programs (probably using jGrasp), how to write a small/s..

  Determine the best way to gather business rules

You have been hired by Happy Health to determine the best way to gather business rules for a new phone system.

  Compute the total annual compensation of a salesperson

Write a Java application using NetBeans Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors: A salesperson will earn a fixed salary of $35,750

  Prints out a summary for a list of prescriptions

Create a class that prints out a summary for a list of prescriptions. Using your Prescription class and some if statements you will read in 3 prescriptions and print out an appropriate summary with a list of the prescriptions

  Note the line number in the statement

Note the line number in the statement

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