Concept explainers
In C++
Call your class quadraticExpression.
• Your private data will be a, b, c. Make them doubles.
• Create an enumerated list with
o NO_ROOTS = 0
o ONE_ROOT = 1
o TWO_ROOTS = 2
o INFINITE_ROOTS = 3
• Write the constructor as stated in the book
• Write the changeCoeeficients as stated in the book
• Write the getACoeeficient, getBCoeeficient,
getCCoeeficient as inline constant functions
• Write evaluate function to take a double a return a double. Constant
function.
• Write getNumberOfRoots function to return an integer. Constant
function.
• Write getFirstRoot and getSecondRoot to return the first and second
roots. Return a domain_error is there is no first or second root.
Constant Functions.
Use my .cpp file to test out your class
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 2 images
- IN C++ Lab #6: Shapes Create a class named Point. private attributes x and y of integer type. Create a class named Shape. private attributes: Point points[6] int howManyPoints; Create a Main Menu: Add a Triangle shape Add a Rectangle shape Add a Pentagon shape Add a Hexagon shape Exit All class functions should be well defined in the scope of this lab. Use operator overloading for the array in Shape class. Once you ask the points of any shape it will display in the terminal the points added.arrow_forwardIN JAVA PLEASE, need help finding an element in the list /** * Returns whether the given value exists in the list. * @param value - value to be searched. * @return true if specified value is present in the list, false otherwise. */ public int indexOf(int value) { //Implement this method return -1; }arrow_forwardIn Kotlin, use this Employee class Use this Employee class data class Employee(val name: String, val wage: Double, val hours: Double) and this list of Employees: val l: List = listOf(Employee("Bob", 34.33, 42.0), Employee ("Cathy", 27.33, 15.25), Employee("Carlos", 46.99, 38.75), Employee("Tomas", 49.66,28.45), Employee("Xavier", 34.56, 11.5)) Write a function called formatPaycheck that takes a Pair and returns a String. formatPaycheck should use the two parts of the Pair to put together and return a String like this, with the paycheck amount shown to two digits past the decimal point: Pay to the order of Cathy $359.47 Use raise() to raise all the Employees' pay by 15%. Then use map with the payroll and formatPaycheck functions to get a list of the paychecks in the format shown above. Print the result. The output should look like this: [Pay to the order of Bob $1077.79, Pay to the order of Cathy $359.47, Pay to the order of Carlos $1361.09, Pay to the order of Tomas $1056.09,…arrow_forward
- in C++ Write a method ‘void addBack(double x)’ that adds value x to the back of a linked list. Assume you have access to a ‘head’ pointer pointing to the first node in the list. Please note that you do NOT have a tail pointer. Be sure to check for any special cases.arrow_forwardIn GO language. Create a struct that has student name, id, and GPA. Write functions to create a student, modify the student’s id, and modify the student's GPA, and print the student’s information. (This is like creating a class and methods). Now create an array of three students and test your functions. You may hardcode your values if using a web conpiler. (Please hardcode the values!)arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education