Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

->proj;

// A Bit More With the Four Languages

Project 00 will be quite similar to Lab 00, but this time you will implement five geometric shape volume calculations in all four programming languages: Java, Ada, Clojure, and Ruby. That is: twenty programs in total!

The problems to be solved are to compute the volume of geometric shapes given their dimensions. The geometric shapes and their volume formulas are:

ShapeFormulaNotesFile Names
CylinderV=πr2hV = \pi r^2 hrr is the radius of the base, hh is the heightCylinder.java, cylinder.adb, cylinder.clj, cylinder.rb
ConeV=13πr2hV = \frac{1}{3} \pi r^2 hrr is the radius of the base, hh is the heightCone.java, cone.adb, cone.clj, cone.rb
Rectangular PrismV=l×w×hV = l \times w \times hll is the length, ww is the width, hh is the heightRectangularPrism.java, rectangular_prism.adb, rectangular_prism.clj, rectangular_prism.rb
PyramidV=13lwhV = \frac{1}{3} l w hll is the base length, ww is the base width, hh is the height (assumes a rectangular base where B=l×wB = l \times w)Pyramid.java, pyramid.adb, pyramid.clj, pyramid.rb
TorusV=2π2Rr2V = 2 \pi^2 R r^2RR is the distance from the center of the tube to the center of the torus, rr is the radius of the tubeTorus.java, torus.adb, torus.clj, torus.rb

You must implement all five shapes in all four languages (20 programs total). Name your files exactly as shown in the table above.

To start your project, go to this link and accept the assignment. Once you have accepted and the repository is generated on github, go to Coder, open VSCode, and clone your assignment repository by following these steps:

  1. Open VSCode and open the Terminal (Ctrl + ` ).

  2. On your GitHub classroom assignment page, copy the repository URL by clicking the green “Code” button and then clicking the clipboard icon.

  3. In the VSCode terminal, type the following command, replacing <repository-url> with the URL you just copied:

git clone <repository-url>
  1. Press Enter. This will create a local copy of your assignment repository in Coder.

Your project contains four folders: java, ada, clojure, and ruby. Create all five volume calculation programs in each folder.

Rubric

CriterionExcellent (100%)Satisfactory (70%)Needs Improvement (40%)Missing (0%)
CorrectnessAll programs correctly compute the volume for all five shapes in all four languages.Most programs correctly compute the volume for most shapes in most languages.Some programs compute the volume correctly, but there are significant errors in others.No programs compute the volume correctly.
Code QualityCode is well-organized, follows language conventions, and includes meaningful comments.Code is mostly organized, with some adherence to language conventions and some comments.Code is poorly organized, lacks adherence to language conventions, and has few comments.Code is disorganized, does not follow language conventions, and lacks comments.
SubmissionAll files are named correctly and submitted on time.Most files are named correctly and submitted on time.Some files are named incorrectly or submitted late.Files are named incorrectly and/or not submitted.

Ways students lose points: