In the UML diagram below, the classes Programmer and the Accountant both extend the Employee class,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In the UML diagram below, the classes Programmer and the Accountant both extend the Employee class, and they inherit the fields name, age, and salary from employee. Create the three classes then test them by create: 1. Accountant: name: Ahmed, age: 30, salary: 15000, role: Account Receivable 2. Programmer: name: Maryam, age: 26, salary: 14000, languages: C++, Python, Java 3. Print the details of each object and print the number of Employees. -name: String -age: int - salary: double -numOfEmployees: static int + Employee() Employee(String, int, double) setName(String) void setAge(int): void setSalary(double): void Employee getName(): String getAge(): int getSalary(): double getNumOfEmployees(): static int toString(): String Extends Programmer -languages: ArrayList<String> + Programmer() + Programmer(String, int, double) + addLanguage(String); void + toString(): String Extends Accountant -role: String + Accountant()) +Accountant(String, int, double, String) setRole(String): void -getRole(): String +toString(): String In the UML diagram below, the classes Programmer and the Accountant both extend the Employee class, and they inherit the fields name, age, and salary from employee. Create the three classes then test them by create: 1. Accountant: name: Ahmed, age: 30, salary: 15000, role: Account Receivable 2. Programmer: name: Maryam, age: 26, salary: 14000, languages: C++, Python, Java 3. Print the details of each object and print the number of Employees. -name: String -age: int - salary: double -numOfEmployees: static int + Employee() Employee(String, int, double) setName(String) void setAge(int): void setSalary(double): void Employee getName(): String getAge(): int getSalary(): double getNumOfEmployees(): static int toString(): String Extends Programmer -languages: ArrayList<String> + Programmer() + Programmer(String, int, double) + addLanguage(String); void + toString(): String Extends Accountant -role: String + Accountant()) +Accountant(String, int, double, String) setRole(String): void -getRole(): String +toString(): String
Expert Answer:
Answer rating: 100% (QA)
three Java classes Employee Programmer and Accountant The Employee class will be the base class and the Programmer and Accountant classes will extend it The Employee class should have the following fi... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
A charge distribution is uniform along the z-axis and of the r-dependence p=po [1-(ra)] for r a where po and a are constants and 7 is the radial component in a cylindrical coordinate system. (a) Find...
-
For this last project, you must implement two Java classes. One will be a "Player'' class, which will "simulate" a game player profile, and the other will be a -driver program which allows two...
-
This lab requires you to develop a solution using Java object-oriented programming that simulates an order system for children's toys. The child will manage a collection/list of toys (each child owns...
-
An investor bought a 70-strike European put option on an index with six months to expiration.The premium for this option was 1. The investor also wrote an 80-strike European put optionon the same...
-
Calculate the bond length for the NaCl molecule given that three successive wavelengths for rotational transitions are 23.1 mm, 11.6 mm, and 7.71 mm.
-
Are They Vector Spaces? In each of Problems 1-3, decide whether or not the given set constitutes a vector space. Assume "standard" definitions of the operations? 1. The set of vectors in the first...
-
Use the Get Wired. Inc., data from Problem 16-45B. Requirements 1. Prepare the 2005 statement of cash flows by the direct method. Follow the statement format given in Exhibit 16A-3. 2. How will what...
-
As a second-year financial analyst for A.J. Straub Investments, you are performing an initial analysis on Reliant Pharmaceuticals. A difficulty youve encountered in making comparisons with its chief...
-
Analyze the challenges and advancements in sustainable construction practices within the realm of civil engineering, encompassing innovative approaches to materials sourcing, construction techniques,...
-
A manufacturer has acquired four small assembly plants, located in Charlotte, Tulsa, Memphis, and Buffalo. The plan is to remodel and keep two of the plants and close the other two. The table at the...
-
Given A = AB and BA. AB = BA = 1 0 4 and B = [6 -7 -1 8], find
-
White light with a wavelength range of 350 - 700 nm is incident from air (n = 1.00 onto a thin film. The film has air on one side and a material of a higher refractive index on the other, as per the...
-
i. Convert (673.14)g to binary ii. Convert (C6B.09)16 to binary. iii. Convert (68BE) 16 to Octal. iv. Convert (5314.3)g to Hexadecimal.
-
3. (9 points) Evaluate the following expression. 10110 01101 bitwise OR 10110 01101 bitwise AND 00100 11101 bitwise XOR
-
The compass of the tangent galvanometer was at angle of 0=45 with respect to the earth magnetic field B (S-N), the plane of the coil is parallel to Be as shown in Fig What is the magnitude of the...
-
3) Use the Fundamental Theorem of Calculus to find the derivative of the function 22 2441 dz
-
"Find y(z) for the sampled data closed loop system.
-
The following processes constitute the air-standard Diesel cycle: 12: isentropic compression,23: constant-volume energy addition (T and P increase),34: constant-pressure energy addition (v...
-
What is the numeric value of each of the following expressions as evaluated by Java? a. 4 + 6 * 2 b. 10 / 5 + 8 c. 12 / 4 + 16 / 2 d. 17 / 2 e. 22 / 5 f. 39 / 10 g. 19 % (2 + 3) h. 3 + 4 * 20 / 3 i....
-
You can instantiate concrete objects from a(n) ____________. a. Abstract class b. Interface c. Either a or b d. Neither a nor b
-
Suppose that you declare two String objects as: String word1 = new String("happy"); String word2 = new String("happy"); The value of word1.equals(word2) is ____________. a. True b. False c. Illegal...
-
Owing to a small federal grant from the Department of Housing and Urban Development (HUD) to the Town of Stillman, Nadine Gordimer, CPA has performed grant audits for the town in each of the past...
-
A public accounting firm has been engaged to perform the audit of a local, federally funded Housing Allowance Program. The objective of the program is to increase the housing standards of Agana...
-
The City of Central Falls has engaged Robert Cohen, CPA to audit the June 30, 1999 financial statements of the City's Water Department under the GAO's Government Auditing Standards. Cohen's report...
Study smarter with the SolutionInn App