Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project... Linear Function You are a software engineer with the Blue Pelican Engineering Corporation. Your immediate supervisor has need of a class called LinearFunction and

image text in transcribed
Project... Linear Function You are a software engineer with the Blue Pelican Engineering Corporation. Your immediate supervisor has need of a class called LinearFunction and she knows exactly the methods that it needs to include. Not having time to write it herself, she assigns the job to you. To insure that you produce exactly the methods she wants, she is providing the interface below and requiring that you implement this interface in the LinearFunction class you produce. When your project is complete, she will simply look at your class signature and if she sees implements LinearFunction Methods, she will know for certain that you have implemented all the methods she originally specified in the interface; otherwise, your code would not compile. public interface LinearFunctionMethods { double getSlope(); double getYintercept(); double getRoot(); double get Yvalue(double x); //return the y value corresponding to x double getXvalue(double y); //return the x value corresponding to y } For simplicity we will assume that the linear function's graph can never be vertical or horizontal. (This eliminates some complications with the math). In writing your methods, simply recall the y = mx + b portion of your algebra studies. The constructor of your class should allow you to pass the slope (m) and y-intercept(b) of the Linear Function object you are instantiating

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions