Design and implement a timedate adt that can be used

Assignment Help Basic Computer Science
Reference no: EM131313010

1. Design and implement a TimeDate ADT that can be used to represent both a date and time as a single entity.

2. A line segment is a straight line bounded by two endpoints. The Line Segment ADT, whose operations are described below, represents a line segment defined by points in the two-dimensional Cartesian coordinate system. Use the Point class from Appendix D and implement the Line Segment ADT.

* LineSegment( ptA, ptB ): Creates a new Line Segment instance defined by the two Point objects.
* endPointA(): Returns the first endpoint of the line.

* endPointB(): Returns the second endpoint of the line.

* length (): Returns the length of the line segment given as the Euclidean distance between the two endpoints.

* toString (): Returns a string representation of the line segment in the format (Ax, Ay)#(Bx, By).

* isVertical(): Is the line segment parallel to the y-axis?

* isHorizontal(): Is the line segment parallel to the x-axis?

* isParallel( otherLine ): Is this line segment parallel to the otherLine?

* isPerpendicular( otherLine ): Is this line segment perpendicular to the otherLine?

* intersects(otherLine ): Does this line segment intersect the otherLine?

* bisects( otherLine ): Does this line segment bisect the otherLine?

* slope(): Returns the slope of the line segment given as the rise over the run. If the line segment is vertical, None is returned.

* shift( xInc, yInc ): Shifts the line segment by xInc amount along the x-axis and yInc amount along the y-axis.

* midpoint(): Returns the midpoint of the line segment as a Point object.

Reference no: EM131313010

Questions Cloud

Implement the counting bag adt : A Counting Bag ADT is just like the Bag ADT but includes the numOf(item) operation, which returns the number of occurrences of the given item in the bag. Implement the Counting Bag ADT and defend your selection of data structure.
Effectively with the management of a business : From which two sources does a union get its power to negotiate effectively with the management of a business? What is the significance of unions to managers?
Organization benefit from using publicity : What types of public-relations tools can organizations use? How might an organization benefit from using publicity?
History of the farmworker movement in the united states : Each section contains primary source materials that document the history of the Farmworker Movement in the United States between 1962-1993. For example, you may want to read a couple of essays written by farmworker strikers and volunteers.
Design and implement a timedate adt that can be used : Design and implement a TimeDate ADT that can be used to represent both a date and time as a single entity.
Illustrate the revenue cycle using a flowchart tool : Illustrate the revenue cycle using a flowchart tool. Take the patient through the cycle from the initial point of contact through the care and ending at the point where the payment is collected.
What is the expected return on stock y for next year : If there is a 50% chance that the economy will recover, and a 50% that it will not, what is the expected return on Stock Y for next year?
Do they give back to the community : Do they give back to the community? Do you feel employees are happy working there? What do you think the prospects are for future growth and profitability? Please elaborate on any / all of the above items or anything else you found to be interesti..
Design a student file writer adt that can be used to display : Design a Student File Writer ADT that can be used to display, or store to an output device, student records contained in a StudentRecord object.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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