[SOLVED] ECE 325 Assignment 7-Type Compatibility and Generics

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 Assignment7-milncs.zip (498.6 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

 

 

 

In this assignment, you should submit three Java files for Question 1 and 2:ArrayExample.java,ArrayExam andArrayListExample.java. For Question 3 the “difficult question”, you should submit a folder that contains all modified files.

These questions use a hierarchy of classes of simple geometric objects:

·GeometricShape.java

·TwoDShape.java

·ThreeDShape.java

·Circle.java

·Cone.java

·Rectangle.java ·Sphere.java

Test.javais a little test class that you can run to make sure the other classes are working.

1. Java Arrays and Type Compatibility Rules

Look at the skeleton for the main method inArrayExample.java. Add some additional statements to it so that the code compiles correctly, and when it is run, it raises

a java.lang.ArrayStoreException when adding a cone to geoshapes (Adding a circle should be OK). Here is the exception you should get:

 

File submissions

ArunWoosaree.zip

Export to portfolio

Edit submission

Make changes to your submission

Feedback

\

  • Assignment7-milncs.zip