Design and write a base e and three derived classes

Assignment Help JAVA Programming
Reference no: EM132076054

Description In this assignment, you will be using inheritance and polymorphism to implement a similar s to the ape example in the lecture.

1. For this, you will need to design and write a base e and three derived classes that inherit from the base (similar to the shape class and the derived shape base asses).

You will also need a "manager" abject that will hold a (fixed) array of pointers to your type (similar to the drawing class)

2. The base class or may have any member variables itself, depending on your design.

3. The may not derived classes should have at least one each describe the structure of that class, member to There should be at least one virtual functian in the base class that each derived class will override The base class' virtual function should be pure virtual (a.k.a. abstract) unless the base does indeed have an implementation. Each derived type's override the virtual function should cause some of output to std-cout to indicate that it was invoked

4. Each class should inelude a full set of constructors to initialize their member(s) as well as the base class. Each derived class should call the base class' constructor in their initialization lists if needed

5. Your manager class will have an array of pointers to the base type that it manages and a method to add objects (by pointer-to-base) into the array and track how many items have been added

6. Include a function in the manager class that will loop through all of the objects in the array and invoke the virtual function for each element Gust like drawing: draw looped through all of its shapes) In your main function, instantiate a "manager object

8. Add several objects of your types to the manager object. These objects will have to be created dynamically (with new) and passed into the function you made in (5) that will add the objects to the

9. Call the manager object's function from (6) that will loop through all objects you just added.

10. Make sure that the manager's constructor cleans up all of its objects when the manager object goes out of scope

11. Place all classes in their own headers (protecting against multiple inclusion) and in a namespace of your own choosing.

Please turn in all source (and nothing but the source) on Blackboard.

Reference no: EM132076054

Questions Cloud

Produce a short report by investigating and advising company : This assessment item requires you to produce a short report by investigating and advising a company on some key topics and aspects of the use of virtualisation
Write a program that finds either the largest or smallest : Write a program that finds either the largest or smallest of the ten numbers as command-line arguments.
Calculate the mean access time to four decimal digits : You have a 2-level cache. Level 1 cache is 1MB and level 2 cache is 2MB. Level 1 cache has a mean access time of 20 nsec, level 2 200 nsec.
Define and explain the concept of the terminologies : Define and explain the concept of the following terminologies: Electronic Records Management; Business intelligence (BI) and Analytics;
Design and write a base e and three derived classes : Design and write a base e and three derived classes that inherit from the base (similar to the shape class and the derived shape base asses).
Write a recursive function that takes one parameter : Write a recursive function that takes one parameter n (n>0) of type int and returns
Express in mbytes the smallest memory this computer can : A computer with a 64-bit wide data bus uses 512M x 16 dynamic RAM memory chips. Express in Mbytes the smallest memory this computer can have?
How many bits would the tag field be in this case : Assume 64-bit addresses and the layout from chapter 4. How many bits would the tag field be in this case?
How about with block transfer is used : If a clock has a speed of 250Mhz and it requires 3 clock cycles to transfer a word, how long will it take to transfer 6 words if a block transfer is not used?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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