1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
viva [34]
3 years ago
11

Design a class named QuadraticEquation for a quadratic equation ax^2+bx+x=0. The class contains: **private data fields a, b, and

c that represents three coefficients. **a constructor for the arguments for a, b, and c. **three get methods for a, b, and c. **a method named getDiscriminant() that returns the discriminant, which is b2-4ac **the methods named getRoot1() and getRoot2() for returning two roots of the equation, or returning 0 if the discriminant is negative.[/color]
Computers and Technology
1 answer:
LenaWriter [7]3 years ago
4 0

Answer:

<em>C++</em>

///////////////////////////////////////////////////////////////////////////////////////////

#include <iostream>

using namespace std;

//////////////////////////////////////////////////////////////////

class QuadraticEquation {

   int a, b, c;

   

public:

   QuadraticEquation(int a, int b, int c) {

       this->a = a;

       this->b = b;

       this->c = c;

   }

   ////////////////////////////////////////

   int getA() {

       return a;

   }

   

   int getB() {

       return b;

   }

   

   int getC() {

       return c;

   }

   ////////////////////////////////////////

   // returns the discriminant, which is b2-4ac

   int getDiscriminant() {

       return (b*2)-(4*a*c);

   }

   

   int getRoot1() {

       if (getDiscriminant() < 0)

           return 0;

       else {

           // Please specify how to calculate the two roots.

           return 1;

       }

   }

   

   int getRoot2() {

       if (getDiscriminant() < 0)

           return 0;

       else {

           // Please specify how to calculate the two roots.

           return -1;

       }

   }

};

//////////////////////////////////////////////////////////////////

int main() {

   return 0;

}

You might be interested in
To make a complicated task easier, use a _____.
tia_tia [17]
I believe the answer is B spread sheet because i use spread sheets to make my life easier. I organize info in a spread sheet then it is really easy to find.

hope this helps<span />
6 0
2 years ago
You speak to a business owner that is taking in almost $2,000 in revenue each month. The owner still says that they’re having tr
Serga [27]
Let's say for example that the business is taking in $2000 of revenue.  That is the amount that the business collected for it's services - like for fixing the computer.  What if though it costs $500 for the equipment (that's an expense).  Now they only made $1500.  Now the customer complains and says that the computer isn't fixed properly so the company sends out a techie for 2 additional hours.  They need to pay their employee (another expense).  Now the $1500 is down to $1400.  They would have utilities to keep their lights on and insurance and many other expenses.

Your profit looks like this:
Profit = Revenue - Expenses
7 0
3 years ago
Company A has a project plan for a new product under development. The product will be one of many released in the coming year. T
gizmo_the_mogwai [7]

Answer:

Company A

The ISO 27002 classification level that is most likely assigned to this document is:

b) Proprietary

Explanation:

The ISO 27002 classification levels adopted by commercial organizations are Restricted (top secret is preferred in government circles), Confidential, Internal (or proprietary), and Public. Since the new product is under development, one of many, and most likely known to the project team, the project plan will be classified as Proprietary.  Company A designates this document as Proprietary or Internal to show that disclosure of the information to its competitors is not allowed.  This level of classification shows that Company A can establish intellectual property rights over the document.

4 0
3 years ago
2. You want to discard your old computer and want to securely erase the data from your hard drive. What can you use to do this a
storchak [24]
First, you can backup all of your very important files in a hard drive or a USB that has a big memory. The data that should be stored inside your hard drive are not so important data. The data that you can let go of. Do not save any personal information in your hard drive. After that, you can download a software that can be used to totally wipe out data. A recommended software would be Active Killdisk. This process is called refurbishing. 
5 0
3 years ago
What is the most important reason to create a backup of your files somewhere other than your computer
Marizza181 [45]
The most important reason we should make a backup of our files on a USB or other device is in case our computer suddenly dies. If something in it goes bad and it stops working, you will have then lost everything on your computer. But, if you make a save, you can buy another computer and upload everything onto the new one.
6 0
3 years ago
Other questions:
  • Tommy has hired a marketing company to create a billboard advertisement
    11·2 answers
  • To add color to the entire background of a page, users will select the ___ feature?
    14·1 answer
  • What conversion factor should be used to convert from meters to Gigameters?
    7·1 answer
  • The purpose of maintaining a network of digital forensics specialists is to develop a list of colleagues who specialize in areas
    7·2 answers
  • Complete the below method, isPalindrome(), that takes in a String and returns a boolean. The boolean should be true if the Strin
    7·1 answer
  • As important as it is to plan ahead, sometimes you_____.
    10·2 answers
  • Item 8 Item 8 Shelby Black runs a very successful hair salon in downtown Los Angeles. One of Shelby’s tasks is to input positive
    13·1 answer
  • The most widely used computer device​
    6·2 answers
  • On the new iOS version, can you save photos from ‘review confirmed photos’? If so, how? Thanks!
    10·1 answer
  • Over the last decade, the overall energy consumption of cloud data centers worldwide has remained relatively the same. Why is th
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!