Absolute Java (6th Edition)
Absolute Java (6th Edition)
6th Edition
ISBN: 9780134041674
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 7, Problem 4PP

Define a class called Administrator, which is a derived class of the class SalariedEmployee in Display 7.5. You are to supply the following additional instance variables and methods:

An instance variable of type String that contains the administrator's title (such

as "Director" or "Vice President").

An instance variable of type String that contains the administrator's area of responsibility (such as "Production", "Accounting", or "Personnel").

An instance variable of type String that contains the name of this administrator's immediate supervisor.

Suitable constructors, and suitable accessor and mutator methods.

A method for reading in an administrator's data from the keyboard.

Override the definitions for the methods equals and tostring so they are appropriate to the class Administrator.

Also, write a suitable test program.

Blurred answer
Students have asked these similar questions
2019 AP® COMPUTER SCIENCE A FREE-RESPONSE QUESTIONS 2. This question involves the implementation of a fitness tracking system that is represented by the StepTracker class. A StepTracker object is created with a parameter that defines the minimum number of steps that must be taken for a day to be considered active. The StepTracker class provides a constructor and the following methods. addDailySteps, which accumulates information about steps, in readings taken once per day activeDays, which returns the number of active days averageSteps, which returns the average number of steps per day, calculated by dividing the total number of steps taken by the number of days tracked The following table contains a sample code execution sequence and the corresponding results. Statements and Expressions Value Returned Comment (blank if no value) StepTracker tr StepTracker(10000); Days with at least 10,000 steps are considered active. Assume that the parameter is positive. new tr.activeDays () ; No…
In the board game Scrabble, each tile contains a letter, which is used to spell words in rows and columns, and a score, which is used to determine the value of words. The point of this exercise is to practice the mechanical part of creating a new class definition: Write a definition for a class named Tile that represents Scrabble tiles. The instance variables should be a character named "letter" and an integer named "value". Write a constructor that takes parameters named letter and value, and initializes the instance variables. Create getters for both of the attributes. (No setters, so that a Tile is immutable.) Implement the .toString() and .equals methods for a Tile. Your completed Tile class should work with this Main program (Links to an external site.) so that it produces sample output like shown at the end of the program. You can Fork the program to make your own version in Replit, where you can add your Tile.java, or you can copy the program to your own Java development…
1- Create a hierarchy of Java classes as follows: MyRectangle is_a MyShape; MyOval is a MyShape. Class MyPoint: Class MyPoint is used by class MyShape to define the reference point, p(x, y), of the Java display coordinate system, as well as by all subclasses in the class hierarchy to define the points stipulated in the subclass definition. The class utilizes a color of enum reference type MyColor, and includes appropriate class constructors and methods. The class also includes draw and toString methods, as well as methods that perform point related operations, including but not limited to, shift of point position, distance to the origin and to another point, angle [in degrees] with the x-axis of the line extending from this point to another point. Enum MyColor: Enum MyColor is used by class MyShape and all subclasses in the class hierarchy to define the colors of the shapes. The enum reference type defines a set of constant colors by their red, green, blue, and opacity, components,…

Chapter 7 Solutions

Absolute Java (6th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Introduction to Classes and Objects - Part 1 (Data Structures & Algorithms #3); Author: CS Dojo;https://www.youtube.com/watch?v=8yjkWGRlUmY;License: Standard YouTube License, CC-BY