{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Homework #2\n", "### Assignment\n", "Define a set of classes that, starting from a generic 3D shape, derive a rectangular parallelepiped, a sphere and a cone solid definitions and provides their full area and volume. Area must be calculated in the constructor and accessed via getter and setter, whereas Volume must be calculated implementing an abstract method defined in the parent class. Results should be displayed using polymorphism by iterating over the object instances (use the examples provided in Lecture\\#2).\n", "\n", "### Add your solution below" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" } }, "nbformat": 4, "nbformat_minor": 4 }