Perimeter and area procedures

Assignment Help Basic Statistics
Reference no: EM131043099

Implement a representation for rectangles in a plane. (Hint: You may want to make use of exercise 2.2.) In terms of your constructors and selectors, create procedures that compute the perimeter and the area of a given rectangle. Now implement a different representation for rectangles. Can you design your system with suitable abstraction barriers, so that the same perimeter and area procedures will work using either representation?

exercise 2.2

Consider the problem of representing line segments in a plane. Each segment is represented as a pair of points: a starting point and an ending point. Define a constructor make- segment and selectors start-segment and end-segment that define the representation of segments in terms of points. Furthermore, a point can be represented as a pair of numbers: the x coordinate and the y coordinate. Accordingly, specify a constructor make-point and selectors xpoint and y-point that define this representation. Finally, using your selectors and constructors, define a procedure midpoint-segment that takes a line segment as argument and returns its midpoint (the point whose coordinates are the average of the coordinates of the endpoints). To try your procedures, you'll need a way to print points:

Reference no: EM131043099

Questions Cloud

Integrated into long-term business strategy : In this example, you are asked by the president of the company to pick three of these impediments and provide some recommendations to improve it within the company. Defend your recommendation(s), and include specific actions, milestones/deadlines,..
Alternative procedural representation of pairs : 4. Here is an alternative procedural representation of pairs. For this representation, verify that (car (cons x y)) yields x for any objects x and y.
How organization can best develop-manage star performer : Alex Sander is a new product manager whose drive and talents are attractive to management, but whose intolerant style has alienated employees. This tension is presented against the backdrop of a 360— performance review process. On the other hand, Gla..
Goals-approaches of health care operations management : To make the best use of the concepts and tools of operations analysis, a manager must understand what health care operations management actually encompasses. For this Discussion, you are asked to summarize the functions and goals of operations man..
Perimeter and area procedures : Implement a representation for rectangles in a plane. (Hint: You may want to make use of exercise 2.2.) In terms of your constructors and selectors, create procedures that compute the perimeter and the area of a given rectangle. Now implement a di..
Identity component as consumerism relates to gender roles : Explain the connection between consumer culture and the rise of the post-war family type. Be sure to examine the identity component as consumerism relates to gender roles of the time, and be sure to provide concrete examples to back up your claim..
Some of the stressors that these managers experience : Project teams are made up of individuals from various areas and developments in a company. The most important member of the project team is the project manager. He is often under greater pressure than the rest of the team members. What are some of th..
Discuss in detail 4 types of reward systems : What goals would you set for the sales staff, given your answer to number 1?
What type of employee voice mechanism should be implemented : For a nonunion business situation such as a hotel, what type of employee voice mechanism should be implemented? Why? Outline the structure of the employee mechanism (voluntary or mandatory, individual group or group, decision making authority or just..

Reviews

Write a Review

Basic Statistics Questions & Answers

  What is the standard error of the sulfate in a collection

scientists at the hopkins memorial forest in western massachusetts have been collecting meteorological and environ-

  Analysis of variance and its assumptions

Is there evidence of violations of the usual ANOVA assumptions of equal variances and normal populations? Set up and perform appropriate TESTS at the α = 0.05 level of significance.

  A test for marijuana was tried on 210 subjects who did not

a test for marijuana was tried on 210 subjects who did not use marijuana. the test result was wrong 52 times.a. based

  During a recent year the average cost of making a movie was

during a recent year the average cost of making a movie was 54.8 million. this year a random sample of 15 recent action

  What is the probability that sales will grow by ten percent

However, in situations where growth has not eventually occurred, new operating systems have been announced 10% of the time. Based on all these facts, what is the probability that sales will grow by 10%?

  If cassie goes to the skate park hanna and amy will go if

question if cassie goes to the skate park hanna and amy will go. if hanna or amy go the skate park marc will go. if

  Draw the 2x2 contingency table showing the disease on top

A researcher follows 200 women who exercise regularly and 300 women who do not exercise regularly. After 30 years of follow-up, 20 of the women in the exercise group are diagnosed with osteoporosis while 30 women in the non-exercise group are dia..

  Suppose a population consists of n pairs of people meaning

suppose a population consists of n pairs of people meaning there 2n people in the population. suppose k of the people

  Sketch normal curve and shade area under curve

Sketch the normal curve and shade the area under the curve that is the answer to the question do this on scratch paper and provide a one-sentence description for the assignment.

  A random sample of 33 adult men had a mean weight of 1825

a random sample of 33 adult men had a mean weight of 182.5 pounds and a standard deviation of 22.5 pounds. find a 99

  Instruction using authentic learning

A teacher wants to know if students in her biology class did significantly better on an exam after instruction using authentic learning. The scores pre and post test are listed below. Based on an α = .05, what can the teacher conclude?

  Find probability that crew member earns in range per hour

What is the probability the crew member earns: a. Between $20.50 and $24.00 per hour? b. More than $24.00 per hour? c. Less than $19.00 per hour?

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