Creating a class called bingocard

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

Assignment

This assignment will involve creating a class called bingocard that implements a bingo card and related functions. The functions we are concerned with are as follows:

  • Filling the card with an initial set of values.
  • Marking a value & displaying a message when bingo is obtained the first time.
  • Determining how many marks away a card is from making a bingo.
  • Displaying the card values & marks.
  • Comparing two cards to see how many values they share.
  • Comparing two cards to see if they are equivalent in values & locations.

For our bingo card we shall assume the card is 5x5, the center (free) space is always marked, and the only bingos that count are the traditional single bingo of 5 values marked in a row horizontally, vertically, or diagonally.

Class details:

Implement the following functions:

  • The default constructor, which should place, in order, 1-5, 16-20, 31-35, 46-50, and 61-65 in the columns.
  • void fill(...): Fills the card.
  • int how_close(): Returns the minimum count of values needed to be marked to obtain the bingo on that card.
  • void mark(int): Marks the specific value on the card and displays a message if a bingo is found for the first time only.
  • void display(): Displays the card (using setw(5)- see example output below) and the marked values (x for marked, - for unmarked).
  • int same_values(...): Returns the count of values such that they are on both cards (but not necessarily in the same location).
  • bool equals(...): Returns true if two cards are identical with respect to both values and locations.

The ... above indicates that you need to figure out what goes there and/or it may change based on your implementation of members.

You may use whatever member variables you like for the card and you may have more member functions than the above if you deem it necessary, however use good design choices.

Attachment:- Assignment File.rar

Reference no: EM131640839

Questions Cloud

Discuss modernization theory : Discuss modernization theory. What are this theory's major components? Why is it problematic in the context of the Middle East?
Calculate mean and standard deviation of simulated values : Calculate the mean and standard deviation of the simulated values. How do they compare to the mean and standard deviation of the given probability distribution?
The original constitution to promote industrial economic : List in a phrase and explain in a sentence,5 different articles or duties that the Framers included in the original Constitution to promote industrial economic.
Interactive multimedia training : Interactive Multimedia training is a form of. There is substantial evidence that shows that blended learning is less effective than CBT methods.
Creating a class called bingocard : This assignment will involve creating a class called bingocard that implements a bingo card and related functions
Do you agree with the given perspective : Consider everything you have read about changes in brain chemistry, analyze this statement from a biological perspective. Do you agree with this perspective?
What form of corporate governance fits sustainable company : How do each of these companies address sustainability? What form of corporate governance best fits a sustainable company?
Characteristics of the four stages of team building : 1. Discuss the general characteristics of the four stages of team building: forming, storming, norming and performing?
Was nationalism the single most important force for change : Was nationalism (and/or imperialism) the single most important force for change in world history between 1900 and 1945?

Reviews

len1640839

9/14/2017 1:12:07 AM

I need help on this. First assignment on object oriented programming and I barely understand. Please put comments in the program. You may use whatever member variables you like for the card and you may have more member functions than the above if you deem it necessary, however use good design choices. All input will come in the form of a text file that will be given at the command line (e.g. ./a.out data).

len1640839

9/14/2017 1:12:00 AM

Be sure to: Make member functions constant as appropriate. Make members public or private as appropriate. Pass all objects by reference. Not use global variables. Use proper variable names, spacing, indenting, and commenting per the guidelines. Make sure your code compiles according to the guidelines. Test your code. Try to match the formatting of your output as closely as possible to the example output below to assist in grading.

len1640839

9/14/2017 1:11:51 AM

Submit your assignment as follows: Your main body should be called main.cpp, Your class definition header file should be called bingocard.h. Your class implementation file should be called bingocard.cpp. These three files, and no others, should be inside a directory called bingo, tar your directory & files up per the guidelines, Use the submit script with assignment code 11 to submit the tar file and You may submit multiple times electronically, but the last one before the deadline is the only one that will be graded. Turn in an identical hard copy. Check the guidelines page for more details.

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