[Solved] ISM3255 Assignment 8

$25

File Name: ISM3255_Assignment_8.zip
File Size: 188.4 KB

SKU: [Solved] ISM3255 Assignment 8 Category: Tag:
5/5 - (1 vote)

Similar to the last assignment, in this assignment, you will create FOUR classes:

  • A MainClass
  • A Parent (base) Class
  • A Child class (subclass1)
  • A second Child class (Subclass2)

As a group, choose any entity/concept expect the two examples below) that can be modeled as a Parent class and two different subclasses.

e.g.1: Student Example from the class lecture

  • Parent: Student
  • Child 1: Grad student
  • Child 2 Undergrad student

e.g.2: Vehicle Example from ASG7

  • Parent: Vehicle
  • Child 1: Car
  • Child 2: Plane

Define the parent and two subclasses for it as follow.

You Parent Class should have:

  1. One meaningful attribute which will be inherited by both children (e.g. attributes ID for student or color for vehicle)
  2. One parameterized constructor
  3. One meaningful method which is inherited by both children (e.g. Move() for vehicle)

Hint: dont forget to compile and test your code before moving on.

Each child class should

  • Inherits the parents attribute
  • Has one specific attribute which is not included in the other child (e.g wingspan in plane class)
  • Inherits and extends the parents constructor (see how we did it in your ASG7)
  • Overrides the parents method to do a (slightly) different task as the parents method and the other childs method (e.g. driving for a car and flying for a plane instead of moving for a vehicle)

Once you have designed your parent and children classes, write a MainClass with a main method. Your main method should:

Instantiate an object of each child class, call the method for each child object, and show the outputs. Hint: The outputs should be different since the overridden methods are different.

Instructions for Submission

1. Your main class should start with these two lines:

a. //Group Number: <your group number>

b. //PRESENT Members

2. Save your main class as A8_yourGroupNumber.cs.

3. Submit all FOUR classes that you created as attachments using the E-Learning Assignment tool.

Not following the instruction will result in losing some of your assignment points

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] ISM3255 Assignment 8[Solved] ISM3255 Assignment 8
$25