Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code for c++ Create a class called ASUProf that has the following attributes and functions (all attributes are private, all functions are public) The professor's

image text in transcribed

code for c++

Create a class called ASUProf that has the following attributes and functions (all attributes are private, all functions are public) The professor's name, . The professor's current class name (as a string), The professor's current office hours (as a string,), Current salarv A bool for whether the professor is tenure-track or not A default constructor, as well as a constructor that takes the same types of variables as above, and sets them accordingly. A getter for all variables, and a setter for the class name and office hours variables. Also, add a setter for the tenure-track bool, but quit the program if the professor is tenure- track, but the argument for the setter is false. A function salaryRaise that takes a double and updates the salary of the professor accord- ingly; if the professor is tenure-track, then make the raise twice as large than if he/she is not. All of the implementations of the functions are in the .cpp file, not in the class header. Now, create a main method in a separate file than the class, instantiate an ASUProf object witlh appropriate parameters, and then call several of the functions (getter, setter, salaryRaise, etc.), and print some of the results of the functions Create a class called ASUProf that has the following attributes and functions (all attributes are private, all functions are public) The professor's name, . The professor's current class name (as a string), The professor's current office hours (as a string,), Current salarv A bool for whether the professor is tenure-track or not A default constructor, as well as a constructor that takes the same types of variables as above, and sets them accordingly. A getter for all variables, and a setter for the class name and office hours variables. Also, add a setter for the tenure-track bool, but quit the program if the professor is tenure- track, but the argument for the setter is false. A function salaryRaise that takes a double and updates the salary of the professor accord- ingly; if the professor is tenure-track, then make the raise twice as large than if he/she is not. All of the implementations of the functions are in the .cpp file, not in the class header. Now, create a main method in a separate file than the class, instantiate an ASUProf object witlh appropriate parameters, and then call several of the functions (getter, setter, salaryRaise, etc.), and print some of the results of the functions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions