Create a constructor that initializes the data

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

Create a class called Simple Question and Answer that contains instance data for a simple mathematical question (i.e. What is 5*4?) and for the answer (i.e. 20).Create a constructor that initializes the data.Create a method that returns the question. Create a method that returns that answer. In the driver, you should ask the user if they want to play a simple game and then have them answer at least 5 questions.(you do not need a loop for this) You will create questions with randomized numbers being passed into the constructor. After the user answers the question, just put the actual answer down below the one entered. You do not need to check if they were correct.

Reference no: EM13329178

Questions Cloud

Explain the ph of 0.10m methylammonium chloride : What is the pH of 0.10M methylammonium chloride, CH3NH3Cl(aq)
What is the induced current in the inner loop : A small, 1.90-mm-diameter circular loop with R = 1.10×10?2? is at the center of a large 100-mm-diameter circular loop. What is the induced current in the inner loop
Explain what is the wavelength of the photons emitted : what is the wavelength of the photons emitted by hydrogen atoms when they undergo n=3 to n=2 transitions. Calculate in nanometers. In which region of the electromagnetic spectrum does this radiation occur? A) visible B) Ultraviolet C) Microwaves D..
Determine what is the couples marriage penalty or benefit : In 2013, Lisa and Fred, a married couple, have taxable income of $300,000. If they were to file separate tax returns, Lisa would have reported taxable income of $125,000 and Fred would have reported taxable income of $175,000.
Create a constructor that initializes the data : After the user answers the question, just put the actual answer down below the one entered. You do not need to check if they were correct.
Explain what is the ph during the titration of hac : What is the pH during the titration of 25.00mL of 0.10M HAc(aq) using .10M NaOH(aq) as the titrant, after the addition of 10.0, 25.0, and 30.0ml of titrant.
Design and implement a class called bus : Define the Bus constructor to accept and initialize all instance data. Include getter and setter methods for all instance data.
Will any of pats wages be exempt from social security : Pat Maninen earns a gross salary of $2,100 each week. Assume a rate of 6.2% on $106,800 for Social Security and 1.45% for Medicare. What are Pat's first week's deductions for Social Security and Medicare
Define the cheetah constructor to accept and initialize : Design and implement a class called Cheetah that contains instance data that represents the cheetah's name, age, weight, length and gender.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write recursive boolean method to accept array and value

Write down the recursive boolean method named isMember. The method must accept two arguments: an array and a value. Method must return true if value is found in array.

  Prints out a multiplication table up to a specification

Create a program using C++ that prints out a multiplcation table up to a specfic limit. The code should prompt the user for the limit and then print out the table.

  Implement the delivery company

Implement the delivery company using the classes given in the class diagram above.

  Write a program for keeping a course list

Write a program for keeping a course list for each student in a college. The information about each student should be kept in an object that contains the student's name and a list of courses completed by the student.

  Write programme that allows a user to enter distinct words

Write a programme that allows a user to enter three distinct words and returns them as a single string

  Write a c program that asks for and reads in two integers

Write a C program that asks for and reads in two integers and then reports if one is a multiple of the other.

  Write c program to accept inputs from user

Write down simple c program which accepts following inputs from user that is username and password, it must ask user what he will like to learn today and also ask user to enter char m=math , e= English.

  Write program that stores the numbers in array

Write a c++ program that stores the following numbers in the array named miles: 15,22,16,18,27,23, and 20. have your program copy the data stored in miles to another array.

  Numbers until the user wants and in the end display

Write a C program to enter the numbers until the user wants and in the end display the product of numbers entered by the user. The program should terminate once the user enters the character 'n' and continue computing product if user enters 'y'

  Computer programming techniques

Construct a program from a design and use appropriate functions

  Heights of the individual pupils

Make a C++ program that helps the health visitor making the statistics and heights of the individual pupils,

  Data from the file grocery.dat

Read the data from the file Grocery.dat and assign values to the 10  GroceryItem  objects. Next display these items to allow a customer to select grocery items from the list and indicate the quantity of that item he or she would like to order. When t..

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