CSCI 261 - Programming Concepts

Fall 2018 - Lab 8C - Godzilla vs. Mechagodzilla

Quick Links: Canvas | Mines | Piazza | zyBooks

|   Home |  Contact |  Syllabus |  Assignments |  Schedule |  Resources   |

This lab is due by Tuesday, November 27, 2018, 11:59 PM.


Concepts



Focus on expanding the Godzilla class from Lab8B.


Suggestion: Use NotePad or WordPad



Consider using NotePad or WordPad on your computer to write your code for this lab. Once you feel good about what you've written, then copy the code into your project. Doing this will help you see where you might make mistakes on the exam!

You should write a main.cpp that tests each feature of your class works as expected. You will need to submit your class declaration file, your class definition file, and your main.cpp file for this lab.


Even More Expanded Godzilla Class



It's now time for Godzilla and Mechagodzilla to go to battle. Add an attack function as described below:
  • An attack function that accepts another Godzilla object as a parameter. The function should modify the target's health by subtracting the callee's power. It should also print out a message in the form of "Callee's Name attacks Target's Name." If the target's health falls below zero, print out a second message stating "Target's Name has been vanquished."
Now in main, have Godzilla attack Mechagodzilla once. Then, have Mechagodzilla attack Godzilla until Godzilla has been vanquished. Your program should end at that point.


Lab Submission



You will submit your solution to this lab with the rest of Set8. Detailed instructions for doing this are posted in Assignment 8.


This lab is due by Tuesday, November 27, 2018, 11:59 PM.

Last Updated: 11/09/18 19:32


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0