For this
Modify the program in Listing 8.6 to include at least one Faculty object and at least one Staff object in addition to the Undergraduate and Student objects. Without modification to the for loop, the report should output the name, employee ID, department, and title for the Faculty objects, and the name, employee ID, department, and pay grade for the Staff objects.
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Java: An Introduction to Problem Solving and Programming (8th Edition)
Additional Engineering Textbook Solutions
Experiencing MIS
C++ How to Program (10th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Starting Out with Python (3rd Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
- We are working in 2D and programming in C#. Create a Point class to represent points in 2D. Create an abstract base class named Shape. It should have a position property as a Point. It should be designed as having Move and Resize methods. Create a Line class using Points, derived from Shape class. Its position should be the center of the line. Create a Polygon class representing a closed polygon of Lines, derived from Shape class. Note that, at construction time, Lines may not be provided in order. The continuity and number of the lines should also be checked for a properly closed Polygon. All geometric entities should be moveable. All shapes should be resizable without changing their central positions. All shapes' positions should be their centroids. Shapes should have areas calculated. Write an example C# Console code to demonstrate your program's abilities.arrow_forwardA C++ assignment Implement the GradedActivity class. Copying from the pdfs is fine. Create a new class Assignment which is derived from GradedActivity. It should have three private member ints for 3 different parts of an assignment score: functionality (max 50 points), efficiency (max 25 points), and style (max 25 points). Create member function set() in Assignment which takes three parameter ints and sets the member variables. It should also set its score member, which is inherited from GradedActivity, using the setScore() function, to functionality + efficiency + style. Signature: void Assignment::set(int, int, int) Create a main program which instantiates an Assignment, asks the user for its functionality, efficiency, and style scores, and prints out the score and letter grade for the assignment. ___________________________________________________ Examples from the pdfs: d PassFailExam::set(int q, int m, int p) { double numericScore, pointsEach; numQuestions =…arrow_forwardT/F1. However, implementation classes may be extended, but interface classes cannot.arrow_forward
- Implement the following parking permit class using java It has a dependency on the car class, no need to implement the car class. Use the diagram for refrencearrow_forwardAn unspecified data type can be used for both the parameters and the return type just for abstract classes (because they can not be instantiated) just for the signature of a method (i.e., the parameters) O just for the non-signature parts of the method (i.e., the return type)arrow_forwardConsider a class "Fan" with two integer data members, "state" (0/1 i.e. on or off) and "speed". 1. Write a parameterized Constructor for this class. 2. Write a member function "changeState( )" which behaves similar to pressing a button i.e. it should change the state of the fan. If it is off (0), calling the function should turn it on (1) and vice versa.. Multi Line Text.arrow_forward
- 2. Implement the class below such that it should provide structure with necessary Data Members to all the sub-classes of itself. The object creation of this class is not mandatory. Book -name:String -author:Author -price:double -qty:int = 0arrow_forwardlanguage is c++ sample output included with user input in boldarrow_forwardFor this project, you will implement an email client-server simulator using the object-oriented design diagramed below. The class diagram above shows class attributes (members) and methods (operations). Operations are denoted with a plus. The diamonds indicate an aggregation relationship between the connected classes. For example, a mailbox list can have one or many mailboxes. A Mailbox can have one or many messages. You will therefore need data structures container objects (lists) to contain these types of objects, as we have seen in previous exercises. All class attributes are private unless denoted otherwise and therefore must be accessed with constructors. getters, ord setters. Constructors are a preferred way to set class attributes. Constructors, setters, getters, and toString methods can be generated by IntelliJ. Check the IntelliJ documentation for how to use the Generate feature. Messages are simultaneously sent and received. Therefore, a Message is…arrow_forward
- Create a class employee with the data members,name,id and salary as private data member . Create array of objects for four employee.compare their salary using operator overloading,and display the records of the student who is getting less salary. By c++ language.arrow_forwardWrite an abstract class, it can be anything well defined from the very basics.arrow_forwardYou have to implement program that compares graduate students based on their ranks. The design of the program is given in the following UML diagram: • Student class: Base class that GradStudent extends. • GradStudent class: The objects from this class will be used for comparisons. • Rankable interface: Defines the implementation needed for comparison. GradStudent implements this interface. • Test class will be used to get student information from the user and demonstrate the comparison of students.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