Write out the inputs and expected output of these six tests

Assignment Help Computer Engineering
Reference no: EM131899826

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).

Reference no: EM131899826

Questions Cloud

Calculate your expected total return if you re-invest : You expect to hold the bond until maturity. Calculate your expected total return if you re-invest all coupons at 5 percent.
Why the creation of art should be made a fundamental part : Present an argument that you could deliver to a school board or college that explains why the creation of art, music, dance, sporting activity.
Discuss the properties of the bcg matrix : Walt Disney Company has four major strategic business units: movies (including Pixar and Touchstone), consumer products (Walt Disney World and Disneyland).
Degree of operating leverage : Calculate Firm A's degree of operating leverage. How do I figure out the degree of operating leverage?
Write out the inputs and expected output of these six tests : 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).
Explain why your site is particularly significant : Summarise the history of your site. For example, what was the site and who occupied the site and when - Explain where your site is located and the significance
Think about strategies to improve short-term memory : For this Discussion, consider types of short-term memory. Think about strategies to improve short-term memory.
Expected return than your portfolio but with volatility : What portfolio has a higher expected return than your portfolio but with the same? volatility?
Discuss the differences among managerial accounting : Discuss the differences among managerial accounting, financial accounting, and financial management within an organization.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe how the five types of ai systems differ

Explain how the Internet and the World Wide Web have evolved over the years and disrupted traditional ways of doing business. ??

  Design and implement a program to process golf scores

Design and implement a program to process golf scores. The scores of four golfers are stored in a text file. Each line represents one hole, and the file.

  What impression or attribute about the research process

What impression or attribute about the research process is different than you imagined it to be before taking this course?

  What address would virtual address 1053 translate to

All numbers are decimal, everything is numbered starting from 0, and all addresses are memory byte addresses. The page size is 1024 bytes.

  Write a program that calculates a tip

Write a program that calculates a tip according to the diner's satisfaction as Ask for the diners' satisfaction level using these ratings.

  Elaborate on how the impact of computer crime is quantified

Elaborate on how the impact of computer crime is quantified. Share at least two examples. Include at least four reputable sources.

  Documenting a refined version of your project description

documenting a refined version of your project description and discussing the different stakeholders and clients

  In this assignment you will implement a parallel algorithm

in this assignment you will implement a parallel algorithm that calculates matrix-vector product using mpi processes

  Submit a 8- to 12-slide presentation which provides a

submit a 8- to 12-slide presentation that provides a technical analysis of analog and digital technology including the

  Identify a non-compliant state using first order logic

Write a first order logic statement that represents the control for FTC. Identify a non-compliant state using first order logic.

  Examine the ajax model in relation to good software design

examine the AJAX model in relation to good software design, and the essence of the quoted question. Will AJAX further promote the development of Web based software, or is it just another fad.

  What are the disadvantages of shared hosting

What are the disadvantages of shared hosting? What is the difference between collocated hosting and dedicated hosting? How many sites can be hosted on the same server?

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