Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

JA: . What is your issue regarding?

Customer Question
I need help with...

I need help with something that has already ebeen posted to your site

Technician's Assistant: Sometimes things that you think will be really complicated end up being easy to fix. The Programmer I'm going to connect you with knows all the tricks and shortcuts. Tell me a bit more about what's going on so he can help you best.

Do i have to pay for the programmers help?

Technician's Assistant: Anything else I can tell the Programmer before I connect you two?

How much will it cost me

Technician's Assistant: I'm not sure of the exact price, but there's only a $5 deposit. The rest of the price information will be on the page I send you to.

Are you sure this isnt a scame scam

Technician's Assistant: No. I'm the Programmer's Assistant.

Submitted: 2 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Customer reply replied 2 years ago
Description:This assignment is quite simple in what needs to be done but could turn out to be one of the more complicated programming projects that you will have this term. This assignment will involve storing information in a dynamically allocated array, sorting information and then looking at the data and analyzing the data in the form of a summary.You are to read in a file that contain several records of data, each record will contain: The Last Name of the person taking the survey, First Name of the person taking the survey, and a character “C” or Character “P” that indicates whether a person believes that Cheese cake is a cake “C” or is really a pie “P” .There are an unknown number of records.Programming Specifications:Here are the lists of tasks and specifications.Ask the user for the name of the input file. You must make sure it is a valid file and that it can be opened. If not, you need to continually ask the user for a valid file.Open the file and read the contents only counting the number of records in the file.Close file.Dynamically allocate an array to store the data make sure that you only allocate enough storage to hold exactly the number of records needed.Open the file and read the file into the array.Sort the Array on Last Name in ascending order.Print out the information (to standard output) using the example at the end of this document.Print out at the end of the summary of information (i.e. how many people said that Cheesecake is a Cake and how many said it was a Pie).Also print out the number of participants. Be sure that the number of people who said Cheesecake is a Cake + Cheesecake is Pie is equal to the total number participants.Design Considerations:You will use this C/C++ struct to define your data structure.struct Roster {string LName;string FName;char Cheesecake;}struct Roster * MyRoster;You must determine how many records are in the file before you allocate the array to hold the data.You must have the minimum functions to perform the following operations:Get a valid file name that holds the dataRead the data into the array passing the array as a parameterSort the dataFind the number of people who said Cheesecake is a Pie passing the array as a parameter and returning the number as a return value of the function.Find the number of people who said Cheesecake is a Cake passing the array as a parameter and returning the number as a return value of the function.Sorting the Array passing the array as a parameter by reference.Printing the report passing the array as a const value.General Requirements:No global variables, other than constants and type definitions!Use the const qualifier on member functions wherever it is appropriate.Your main routine should just mainly handle the calling of functions and basic program structure.You will need to use the library for output. You may use the library for formatting your output if you wish.When you write source code, it should be readable and well-documented.You must have prototypes for all of your functions.You may use any sorting technique you wish but the simplest (exchange or bubble sort) is all that is required.The size of the array must match exactly the number of records in the file. No more no less.Grading Criteria:The program compiles. If the program does not compile no further grading can be accomplished. Programs that do not compile will receive a zero.(25 Points) The program executes without exception and produces output. The grading of the output cannot be accomplished unless the program executes.(25 Points) The program produces the correct output.(25 Points) The program specifications are followed.(10 Points)The program is documented (commented) properly.(5 Points)Use constants when values are not to be changed(5 Points)Use proper indentation(5 Points)Use good naming standardsSample Input:Please Enter a Valid File Name: MyFile.txt Sample Output:Sample Output:THE CHEESECAKE REPORTLAST NAME FIRST NAME CAKE OR PIE_________ ___________ ___________Alby Matthew PieBarnett Atricia CakeCarnes Donnel PieDumont Atruis CakeEcho Eziel PieFranko Bill CakeGaitros David PieHero Aziko CakeIsrael Anihako PieNumber of Records: 9Number of People Who Believe Cheesecake is Pie: 5Number of People Who Believe Cheesecake is Cake: 4
Customer reply replied 2 years ago
let me know asap if you can help me with this
Customer reply replied 2 years ago
also an estimated time of completion and the amount it will cost me. Thank you so much for your help i appreciate it
Customer reply replied 2 years ago
I have it started
#include
#include
#include
using namespace std;struct Roster
{
string lname;
string fname;
char cheese;
};const int MAXSIZE = 80;
char * givemename(char* fn);
int recordcount(const char * filename);struct Roster* readarray(const int rcount, char *filename);
void readsurvey(const int rcount, const char * filename, struct Roster *);
int countp(const int rcount, struct Roster *MyRoster);
int countc(const int rcount, struct Roster *MyRoster);
void swap(struct Roster *MyRoster1,struct Roster * MyRoster2);
void BubbleSort (const int rcount, struct Roster*MyRoster);
void DrawRecords(const int rcount, struct Roster*MyRoster);
int drawsummary(const int rcount,const int pcount, const int ccount);int main(void)
{
char * filename = new char [MAXSIZE] ;
struct Roster * MyRoster;
struct Roster *PassedRoster;
int rcount=0, pcount=0, ccount=0;
filename=givemename(filename);
rcount = recordcount(filename);
MyRoster = new struct Roster[rcount];
readsurvey(rcount, filename, MyRoster);
pcount = countp(rcount,MyRoster);
ccount = countc(rcount,MyRoster);
BubbleSort (rcount, MyRoster);
DrawRecords(rcount,MyRoster);
drawsummary(rcount,pcount,ccount);
return 0;
}char * givemename(char * fn)
{
ifstream myfile;
cout << "Please enter a file name : ";
cin >> fn;
myfile.open(fn);
while(!myfile.is_open())
{
cout << "Invalid file name. Please re-enter: ";
cin >> fn;
myfile.open(fn);
}
return fn;
}
int recordcount ( const char* filename)
{
int count=0;
char inputline[MAXSIZE];
ifstream myfile;
myfile.open(filename);
do
{
count ++;
myfile.getline(inputline, MAXSIZE);
cout <<inputline<< endl;
}
while(!myfile.eof());
myfile.close();
return count;
}
void readsurvey(const int rcount, const char * fn, struct Roster *mr)
{
ifstream myfile;
myfile.open(fn);
for(int counter=0; counter<rcount ; counter++)
{
myfile >> mr[counter].lname >> mr[counter].fname >> mr[counter].cheese;
}
}
int countp(const int rcount, struct Roster* MyRoster)
{
int count = 0;
for (int i = 0; i<=rcount; i++)
{
if(MyRoster[i].cheese == 'P')
{
count ++ ;
}
}
return count;
}
int countc(const int rcount, struct Roster* MyRoster)
{
int count = 0;
for (int i = 0; i<=rcount; i++)
{
if(MyRoster[i].cheese == 'C')
{
count ++ ;
}
}
return count;
}void swap(struct Roster* MyRoster1,struct Roster* MyRoster2)
{
struct Roster* temp = new struct Roster;
temp = MyRoster1;
MyRoster1 = MyRoster2;
MyRoster2 = temp;
}void BubbleSort (const int rcount,struct Roster*MyRoster)
{
bool swapped=true;
int j = 0;
while (swapped)
{
swapped = false;
j++;
for (int i=0; i<=rcount; i++)
{
if ( MyRoster[i].lname > MyRoster[i+1].lname)
{
swap(&MyRoster[i], &MyRoster[i+1]);
swapped=true;
}
}
}
}void DrawRecords(const int rcount, struct Roster*MyRoster)
{
cout <<" THE CHEESECAKE REPORT " << endl
<<"LAST NAME FIRST NAME CAKE OR PIE " << endl
<<"__________ __________ ___________ "<< endl;for(int i=0; i <= rcount; i++)
{
cout << MyRoster[i].lname << MyRoster[i].fname;
if(MyRoster[i].cheese == 'C')
{ cout << "CAKE";}
else
cout << "PIE";
cout << endl;
}}int drawsummary(const int rcount,const int pcount,const int ccount )
{
cout << "Number of Records: " << rcount << endl << "Number of People"
"Who Believe Cheesecake is Pie: " << pcount << endl << "Number of "
"People Who Believe Cheesecake is Cake: " << ccount << endl;return 0;
}
Customer reply replied 2 years ago
do you need the txt file?
I want to know there is someone working on this and im not getting completely scammed
Customer reply replied 2 years ago
Am i getting charged for this?
Answered in 1 hour by:
4/7/2016
Programmer: LogicPro, Computer Software Engineer replied 2 years ago
LogicPro
LogicPro, Computer Software Engineer
Category: Programming
Satisfied Customers: 13,458
Experience: Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
Verified
Hi,WelcomeZip all files; upload the zipped file to http://wikisend.com or http://ge.tt and post download link here. What is the deadline?
Ask Your Own Programming Question
Programmer: LogicPro, Computer Software Engineer replied 2 years ago
It seems you didn&#39;t get my previous reply.Do you still need this?
Ask Your Own Programming Question
Customer reply replied 2 years ago
Yes I need it in two hours.
Customer reply replied 2 years ago
Is it possible that you can help me?
Customer reply replied 2 years ago
I have most of the program done
Programmer: LogicPro, Computer Software Engineer replied 2 years ago
Can it be extended to 3-4 hours
Ask Your Own Programming Question
Programmer: LogicPro, Computer Software Engineer replied 2 years ago
Do you still need this?
Ask Your Own Programming Question
Customer reply replied 2 years ago
I want my money back
Customer reply replied 2 years ago
Sorry
Customer reply replied 2 years ago
How do I get money back?
Programmer: LogicPro, Computer Software Engineer replied 2 years ago
ok. You never respondedSending the request
Ask Your Own Programming Question
Was this answer helpful?
Ask ATLPROG Your Own Question
ATLPROG
ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7,677
7,677 Satisfied Customers
Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

ATLPROG is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

13,458 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

800 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
Write a program in Java and have it calculate the payment amount
Write a program in Java and have it calculate the payment amount for 3 mortgage loans: - 7 year at 5.35% - 15 year at 5.5% - 30 year at 5.75% I need to use an array for the different loans. What I nee… read more
Rick
Rick
Principal Engineer - Mobile Engeering
Bachelor\u0027s Degree
81 satisfied customers
The project will simulate a five-card poker game. This program
The project will simulate a five-card poker game. This program will deal two five-card poker hands, evaluate each hand, and determine which is the better hand. The user will play against the computer … read more
ATLPROG
ATLPROG
Computer Software Engineer
7,677 satisfied customers
C++ BlackJack I need a source code to reference. It must be
C++ BlackJack I need a source code to reference. It must be simple in nature and must not use stdafx. There is always a dealer in the game. At the start of the game, the dealer's first card will not b… read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
Hi Again, Taking a Java class. Assignment is below Write
Hi Again, Taking a Java class. Assignment is below: Write a program that takes as input a number of kilometers and prints the corresponding number of nautical miles. You may rely on the following item… read more
unvadim
unvadim
Computer Software Engineer
Diplom
1,168 satisfied customers
I need to create a mortgage calculator program in Java.
I need to create a mortgage calculator program in Java.… read more
Rafael Martins
Rafael Martins
System Developer
446 satisfied customers
I created a website using wix.com and i need to convert it
I created a website using wix.com and i need to convert it over to html5. Does anyone know how to do this?… read more
WesPCDr
WesPCDr
Master\u0027s Degree
170 satisfied customers
I need help with homework assignment. I have part of the
I need help with homework assignment. I have part of the program from the instucter. I am lost on arrays. Please quote a price. 7.10 (Sales Commissions) Use a one-dimensional array to solve the follow… read more
Rick
Rick
Principal Engineer - Mobile Engeering
Bachelor\u0027s Degree
81 satisfied customers
Write a program that allows the user to enter three separate
Write a program that allows the user to enter three separate strings: a city name, state name, and ZIP code. The program should use string concatenation to connect them into one single string like thi… read more
unvadim
unvadim
Computer Software Engineer
Diplom
1,168 satisfied customers
Java GUI program for phonebook that can add and entry edit
Java GUI program for phonebook that can add an entry, edit an entry, look up entry.… read more
jeff
jeff
Software Developer
Master\u0027s Degree
153 satisfied customers
From the book. Write the function removeOrd that removes
From the book. Write the function removeOrd that removes an item from an array-based ordered list. The item to be removed is passed as a parameter to this function. After removing the item, the result… read more
LogicPro
LogicPro
Computer Software Engineer
13,458 satisfied customers
This need to be done in Microsoft Visual C++ 2010 Express You
This need to be done in Microsoft Visual C++ 2010 Express You have the following clients for your consulting firm: Client Business type ACME Construction Machinery design Johnson Electrical Switch man… read more
LogicPro
LogicPro
Computer Software Engineer
13,458 satisfied customers
This assignment is quite simple in what needs to be done but
This assignment is quite simple in what needs to be done but could turn out to be one of the more complicated programming projects that you will have this term. This assignment will involve storing in… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
This assignment is quite simple in what needs to be done but
This assignment is quite simple in what needs to be done but could turn out to be one of the more complicated programming projects that you will have this term. This assignment will involve storing in… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
hello i desperately need help with an assignment for my data
hello i desperately need help with an assignment for my data struct assignment.Our task is to write a program that checks if a word is a palindrome or not using 1.Pointer based ADT Stack and 2. Using … read more
LogicPro
LogicPro
Computer Software Engineer
13,458 satisfied customers
Im having trouble writing a code; that contains serveral records
I'm having trouble writing a code; that contains serveral records of data, each record contains the first name last name and a charceter that is capitol P or capitol C. That indicates a person believe… read more
unvadim
unvadim
Computer Software Engineer
Diplom
1,168 satisfied customers
I need a program written that uses arrays. I have attached
I need a program written that uses arrays. I will attach detailed guidelines to follow. I need the final product before 12/6/10.read more
LogicPro
LogicPro
Computer Software Engineer
13,458 satisfied customers
I have a programming question For this program, you are
I have a programming question: For this program, you are to create an array of integers of size 15. Then, using any method you want, randomly populate the array with integers. Output the contents of t… read more
NeOh
NeOh
Software Engineer
Bachelor's Degree
682 satisfied customers
im suppose to full this shell out it is to find a word in a
im suppose to full this shell out it is to find a word in a text file and replace it //File input/output with text data #include //Include stanard i/o library #include //Include file i/o library using… read more
RobertC
RobertC
Bachelor's Degree
4 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x