Discuss the private member data

Assignment Help C/C++ Programming
Reference no: EM131492660

Question: You need to write a class sship (spaceship) , it is to have the following private member data:

a. Int ID;

b. String stype;

c. Int manabilty; ///short for maneuverability

d. Int firep; ///short for firepower

e. Int Hits /// number of hits it can sustain

Create two instances of sship, ID=1 is stype Xwing, ID=2 is stype Starfighter. ID 1, has manabilty = 77 and firepower = 80, hits = 3 ID 2, has manability 85 and firepower 66, hits = 2 Allow them to fight in the following manner: ID 1 rolls a random number with mean=firepower, standard deviation = 10 if this is greater than the manability of ID 2 then ID 2 hit count is reduced by 1 ID 2 rolls a random number with mean=firepower, standard deviation = 10, if this is greater than the manability of ID 1 then ID 1 hit count is reduced by 1 Repeat until one is destroyed. Display the winner to the screen. Repeat combat 100 times in a loop, and report the number of wins for ID 1, ID 2 and the number of times they are both destroyed. c++ code.

Reference no: EM131492660

Questions Cloud

Why is cash flow planning and budgeting so important : What is the difference between a financial manager's view of stock market and financial accountant's view? Why is cash flow planning and budgeting so important.
Evaluate a periodical or newspaper article : Locate and evaluate a periodical or newspaper article in print or online (e.g,, Wall Street Journal, New York Times, Time magazine
Review of the literature organized by themes : Write a 10-12-page traditional Literature Review on the topic you have been researching throughout this course. Review of the literature organized by themes.
What allow people to productively resolve that dissonance : What impact might this have on their beliefs? What might allow people to productively resolve that dissonance
Discuss the private member data : You need to write a class sship (spaceship) , it is to have the following private member data.
Assume further that long-term annual market return : Assume that Constant-Growth DDM is appropriate valuation model for stock index. Assume further that long-term annual market return is expected to be
Explain what accommodations would you implement : What accommodations/modifications would you implement? Explain. What elements of the accommodations/modifications would be most effective?
What were the ethical implications : For this assignment, please answer the following four questions- What did Milgram find out? What were the ethical implications
Evaluate the performance of a system software : Explain why it is important to monitor and evaluate the performance of a system's software as well as its hardware.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd