[SOLVED] IT2650 Assignment11

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignment_11-x24y7a.zip (640.2 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

This assignment is actually very straightforward – if not simple. While the assignment may be straightforward, the concepts are not.

This assignment ties in most of the major concepts of building objects from other objects – using Inheritance as well as composition.

The task is not to write any new code, I simply want you to understand the concepts and assemble the code and get it to work.

I want you to take the following UML Object Model and create the code stubs.

 

By code stubs, I mean that you should create a project that includes the following Java files within the project, all with the methods and attributes specified by the various class diagrams.

Here are some major hints.

interface Nameable {    public abstract String getName();    public void setName(String n);  }

 

abstract class Mammal {    public void generateHeat() {       System.out.println(“Generating Heat”);

} }

 

class Dog {    Head head;

String name;

 

public void makeNoise() {

System.out.println(“Bark”);

}

 

public String getName() {

return name;

}

 

public void setName(String n){

name = n;

}

 

}

 

class Head {

 

double headSize;

 

}

Finally, you will create a main application class called TestDog where you will create a single Dog called

Fido

public class TestDog {

 

public static void main(String[] args) {

 

Dog fido = new Dog();

 

fido.makeNoise();

 

             fido.setName(“Fido”);               System.out.println(“Name = ” + fido.getName());

 

}

}

 

The primary task here is to assemble everything so that it works! You don’t have to write the code – just assemble it!

 

Step 02 – Run the code (the output should look something like this)

 

 

  • Assignment_11-x24y7a.zip