Compare and contrast abstract classes and interfaces

Assignment Help Data Structure & Algorithms
Reference no: EM133108971

COIT20256 Data Structures and Algorithms - Central Queensland University

Assessment: Implement the classes created in Activities One and Two and submit your source code (.java) files.

Tutorial Questions

Question 1: What are abstract methods? Describe the circumstances in which an abstract method would be appropriate.

Question 2: Compare and contrast abstract classes and interfaces. Why would you use an abstract class? Why would you use an interface?

Question 3: Distinguish between an abstract class and a concrete class.

Question 4: (Payroll System Modification) Modify the payroll system of Figs. 10.4-10.9 of textbook to include an additional Employee subclass PieceWorker that represents an employee whose pay is based on the number of pieces of merchandise produced. Class PieceWorker should contain private instance variables wage (to store the employee's wage per piece) and pieces (to store the number of pieces produced). Provide a concrete implementation of method earnings in class PieceWorker that calculates the employee's earnings by multiplying the number of pieces produced by the wage per piece. Create an array of Employee variables to store references to objects of each concrete class in the new Employee hierarchy. For each Employee, display its string representation and earnings.

Question 5: (Accounts Payable System Modification) In this exercise, we modify the accounts payable application of Figs. 10.11-10.15 to include the complete functionality of the payroll application. The application should still process two Invoice objects, but now should process one object of each of the four Employee subclasses (Figs. 10.5- 10.8). If the object currently being processed is a BasePlusCommissionEmployee, the application should increase the BasePlusCommissionEmployee's base salary by 10%. Finally, the application should output the payment amount for each object. Complete the following steps to create the new application:

a) Modify classes HourlyEmployee and CommissionEmployee to place them in the Payable hierarchy as subclasses of the version of Employee that implements Payable (Fig. 10.13). [Hint: Change the name of method earnings to getPaymentAmount in each subclass so that the class satisfies its inherited contract with interface Payable.]

Attachment:- Data Structures and Algorithms.rar

Reference no: EM133108971

Questions Cloud

Example of training : Give an example of training you were required to do at work that seemed pointless and irrelevant to your job. Do you think the training wasted resources for you
Does the bank have privity of contract with the auditors : Big Logging was a new client in 2013. Mick Merciless was the partner on the audit. Does the bank have privity of contract with the auditors
Tuckman group development model : Tara is a software project manager in Kinesis, a large MNC. Members of her project team are drawn from other departments in the organisation based on the projec
Goal Congruence : The objective of management control system design should be to achieve goal congruence, the harmony between actions managers
Compare and contrast abstract classes and interfaces : Implement the classes created in Activities One and Two and submit your source code (.java) files and What are abstract methods? Describe the circumstances
Think about persuasive speech : Think about persuasive speech that you would like to present on topic of your choice. The speech can be for any context and any length but it must be persuasive
Supply chain management code of ethics : What does the Institute of Supply Chain Management (ISM) code of ethics say about accepting supplier favors and gifts?
Evaluation of the millennial generation in the video : Do you agree with the evaluation of the millennial generation in the video? Why or why not? Be specific in your reasoning.
Compute the cost of the ending work-in-process : During the month, it started 23,000 cell phones, but only 19,000 were fully completed and transferred to the testing department. Compute the cost of the ending

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd