CSCI 3907: Seminar: Performance-Aware Programming

CSCI 3907 Assignment #1: Boss-Mode C++

AI Policy for this assignment: You should be able to complete this assignment based on the work we did together in class. If you still have questions, please get in touch with me first before trying to find solutions online.   C++ is such a big, feature-rich language that if you try to use AI immediately, you are just as likely to confused and frustrated as you are to find the trick that makes the assignment fun and painless.

If I suspect that you submitted a copy/pasted an AI-generated solution, I will ask you to explain to me in-person how your solution works. If you are unable to do this, you will receive a grade of zero on this assignment.



For this assignment you will be modifying your C++ shape code from last week in the following ways:

  1. No explicit memory allocation;i.e., no new or delete

  2. No explicit pointers; i.e., no ->

  3. No inheritance

  4. No mutation

  5. All input variables declared const
What to submit

You should submit everything needed, and only what's needed, including a Makefile, for me to to run your program as follows (where $ represents the command-line prompt):
$ make
$ make run

A circle at (+0.000,+0.000) with radius 2.000
A square at (-2.300,+5.500) with side 3.000
A triangle at (+2.600,-5.500) with base 2.000, height 1.500

The circle has area 12.57
The square has area 9.00
The triangle has area 1.50

After moving:
A circle at (+3.000,+2.000) with radius 2.000
A square at (-0.300,+8.500) with side 3.000
A triangle at (-0.400,-7.500) with base 2.000, height 1.500
If your code crashes at any point during this process, you will get zero credit. You will lose a percentage point for every non-source file (executable, .o, backup) you submit, so be sure to double-check your submission on your our shared github once you're done. For all our assignments, I encourage you to submit early and send me an email asking me to try out your code.