Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Problem

Your job is to come up with tests for a function called line_intersect, which takes two lines as input and returns their intersection. More specifically:

• Lines are represented as pairs of distinct points, such as [[0.0, 0.0], [1.0, 3.0]].

• If the lines do not intersect, line_intersect returns None.

• If the lines intersect in one point, line_intersect returns the point of intersection, such as [0.5, 0.75].

• If the lines are coincident (that is, lie on top of one another), the function returns its first argument (that is, a line).

What are the six most informative test cases you can think of? (That is, if you were allowed to run only six tests, which would tell you the most about whether the function was implemented correctly?) Write out the inputs and expected output of these six tests, and explain why you would choose them. Do not worry about error handling (yet).

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92728172

Have any Question?


Related Questions in Computer Engineering

Whats your answer about the equilibrium change from an

What's your answer about the equilibrium change from an event which decreases both demand and supply? You don't need to provide graph here. Just describe the curve shifts and how the equilibrium price and equilibrium qua ...

Create a class named horse that contains data fields for

Create a class named Horse that contains data fields for the name, color, and birth year. Include get and set methods for these fields. Next, create a subclass named RaceHorse, which contains an additional field that hol ...

Restaurant management database project the restaurant

Restaurant Management Database Project : The restaurant maintains the catalog for the list of food and beverage items that it provides. Apart from providing food facility at their own premises, the restaurant takes order ...

Question suppose a data packet datagram is sent in the

Question : Suppose a data packet (datagram) is sent in the Internet from a source station (computer) to a destination station. What type of addess (physical, MAC, port address or some other) is used to forward the datagr ...

Statistics students participated in an experiment to test

Statistics students participated in an experiment to test the ability to determine when 1-minute (or 60 seconds) has passed. The results are given below in seconds. Find the range and standard deviation for the given sam ...

Refer to the cyclic redundancy check crc codes discussed in

Refer to the Cyclic Redundancy Check (CRC) codes discussed in the textbook and follow the conventions used in the textbook. Consider the 5-bit generator, G=10011, and suppose that D has the value 1010101011. What is the ...

In system analysisdiscuss and give suggestions or comments

In system analysis Discuss and give suggestions or comments for the following questions: 1. Discuss about the project plan (activities and scheduling) 2. What are the new tools and strategies used in project plan or mana ...

We use typecasting when we want to cast a value of one type

We use typecasting when we want to cast a value of one type to a value of another type. Specifically, in this program, we want to convert a value of type double to a value of type int. Recall that Java lets you assign a ...

Recall that s-des operates on a block size of 8 bits

Recall that S-DES operates on a block size of 8 bits, producing a ciphertext that is also 8 bits long. a. In this scenario, how many different ciphertexts are there? b. How many different 8-bit block ciphers can there be ...

Whats the difference between a bigfile tablespace and a

What's the difference between a Bigfile tablespace and a Smallfile tablespace? Explain which you would use for your database and why.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As