Em Andamento

Flash Work

Download the zipped project file [url removed, login to view] from the Homework Assignments area of Blackboard. The file contains a project file Homework [url removed, login to view], an implementation file flash.h for the flash class, and an application file flashapp.cpp.

Define the member functions to work with a list of flash cards for doing arithmetic. Here are the declarations:

struct card

{

int n1, n2, // values on flash card

answer; // answer to flash card

char op; // operator (*, +, -, / or %)

card* next; // pointer to the next card

};

typedef card* card_ptr;

class flash

{

private:

card_ptr front;

public:

flash ();

void add_problem ();

void remove_problem ();

void print ();

void quiz ();

};

The member functions to be defined are:

flash: constructor that creates an empty flash card list.

add_problem: Adds a problem to the end of the list (not to the front). It should prompt the user for the equation to solve (example: 8 + 2). The function should create a node, place in the private data for the node, including the answer which it must compute, and insert it at the end of the list. / and % perform integer arithmetic. An indication that a problem has been added should be printed.

remove_problem: Removes the last problem in the list. If there are no problems in the list, an error message should be printed. The removed node should be recycled. An indication that a problem has been removed should be printed.

print: Prints the problems in the list. They should be printed one per line, in equation form and should include the answers. If there are no problems to print, an error message should be printed.

quiz: Presents each problem in turn to the user. For example:

6 * 2 =

quiz indicates for each problem whether the user correctly answered it. When the user enters a wrong answer, the correct answer should be given. quiz should keep a tally of the number of problems correctly answered. It should print the number of problems correctly answered out of the total number at the end of the quiz. For example:

You got 7 problems out of 9 problems correct!

If there are no problems in the list, quiz should print an error message.

You should not add any new private data items to the class. If you would like to write some private helper functions, you may do so.

A menu driven application file is included in the project folder. You need to include a declaration of a flash class variable and calls to the member functions. When done, place your flash.h and [url removed, login to view] files in the Homework 8 area on Blackboard

Habilidades: Programação C++

Ver mais: struct programming, struct cpp, programming cpp, problems solve programming, pointer programming, node programming, need tally, data driven programming, data cpp, programming typedef, programming quiz, programming pointer, programming operator, programming char, cpp struct, cpp list, cpp data, cplusplus struct, char programming, flash work, member card file, member flash, programming project quiz, homework problems, homework example

Acerca do Empregador:
( 4 comentários ) Bronx, United States

ID do Projeto: #6811207

Premiar a:

qiangjin2014

Dear, my client I read your job description. It is very interesting for me. It is my goal to complete your job. Thanks.

$24 USD em 1 dia
(2 Avaliações)
1.5

6 freelancers estão ofertando em média $32 para este trabalho

hbxfnzwpf

I am very proficient in c, c++. I have 15 years c++ developing experience now, and I have worked for 5 years. My work is online game developing, and mainly focus on server side, the language is c++ under linux. I used Mais

$40 USD em 1 dia
(34 Comentários)
5.4
maoo92

I study computer science in college. Worked a lot in C++ can help u get this done. Waiting to hear from you on chat

$30 USD em 1 dia
(4 Comentários)
1.9
inetchem123

Hello. We are a team of 7 peoples. We are capable of carrying out presented contents well. Once awarded the bid,We can finish this project ahead of time. This is REALLY eye-catching and interesting project, we'd l Mais

$50 USD em 1 dia
(0 Comentários)
0.0
mohitgupta6511

I am currently working on some similar projects so it would be easy for me . that' all I could say...

$25 USD in 10 dias
(0 Comentários)
0.0
wokdev

hi I am a computer science grad student at TAMU. let me know if you would like me to work on this. cheers

$21 USD em 1 dia
(0 Comentários)
0.0