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

  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