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

  Write fibonacci function that calculates the nth number

The Fibonnacci numbers begin with the numbers 0 and 1 and have the property that each succeeding number is the sum of the two preceding numbers. For xample: 0,1,1,2,3,5,8,13,21,...etc. Write Fibonacci() function that calculates the n'th Fibonacci ..

  Program that uses non recursive function to search

Write a C program that uses non recursive function to search for a key value in a given sorted list of integers usingt Binary search

  Explain advantageous to use a definite loop

Describe one scenario not mentioned in the textbook in which it would be advantageous for you to use a definite loop as opposed to an indefinite loop when developing a program. Provide a rationale for your response.

  Describe what kind of architecture the new payroll

you have been tasked with building a payroll program for a large organization with offices spread across the united

  Formulate the algorithm using pseudocode

Write a program to assist the payroll secretary in computing the weekly pay for each employee. Formulate the algorithm using pseudocode.

  Develop data structures - chord system

Develop data structures which are suitable to hold required information for each peer in a CHORD system. Note that index nodes can hold local information only

  Solve a single quadratic equation of the form

Write a C++ program to solve a single quadratic equation of the form - The actual solution of the equation shall be done by a function named equSolver(), which takes three coefficients as parameters and returns a structure of three fields: two root..

  Create a class called rational for performing arithmetic

Rational Class Create a class called Rational for performing arithmetic with fractions. Write a program to test your class. Use integer variables to represent the private data of the class-the numerator and the denominator. Provide a constructor th..

  Remove the error of c program

I am providing the Pseudocode below and the C++ program in attachment. Need help correcting C++ program (compile):

  Show the contents of the id array

Show the contents of the id array after each union operation when you use the quick find algorithm (Program below) to solve the connectivity problem for the sequence 0-2, 1-4, 2-5, 3-6, 0-4, 6-0, and 1-3.

  International space station

Let's say you own a company that makes bolts that are used on the International Space Station! These bolts have very specific requirements but two of the most important requirements are strength and heat resistance. NASA says that you must have a ..

  Program to remove comments from the program

A C++ program that asks the user to enter a name of a file containing a C++ program - Program reads the file and produces an output that deletes all comments beginning with // and comments between /* */

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