How JustAnswer Works:

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

Ask ATLPROG Your Own Question

ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 9151
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
44910485
Type Your Programming Question Here...
ATLPROG is online now
A new question is answered every 9 seconds

I was wondering if you can take a look at the code and

Customer Question

Hello I was wondering if you can take a look at the code and see why I am getting errors.
// CIS247C_WK1_Lab_Fesler.cpp :
//Program Name: Basic User Interface
//Programmer: Ryan Fesler
//CIS247, Week 1 Lab
//Program Description: Basic User Interface
#include
#include
using namespace std;
void DisplayApplicationInformation();
void DisplayDivider(string message);
string GetInput(string message);
void TerminateApplication();
int main()
{
string name;
string input;
int age;
double mileage;
DisplayApplicationInformation();
DisplayDivider("Start Program");
DisplayDivider("Get Name");
name = GetInput("Your Name");
cout << "Your name is " << name << endl;
DisplayDivider("Get Age");
input = GetInput("Your Age");
age = atoi(input.c_str());
cout << "Your age is " << age << endl;
DisplayDivider("Get Mileage");
input = GetInput("Your mileage");
mileage = atof(input.c_str());
cout << "Your car MPG is " << mileage << endl;
TerminateApplication();
return 0;
}
void DisplayApplicationInformation()
{
cout << "Welcome the Basic User Interface Program " << endl;
cout << "CIS247, Week 1 Lab" << endl;
cout << "Name: YOUR NAME" << endl;
cout << "This program accepts user input as a string, then makes the appropriate data conversion" << endl;
}
void DisplayDivider(string outputTile)
{
cout << "**********************" << outputTile
<< "******************" << endl;
}
Submitted: 1 year ago.
Category: Programming
Expert:  ATLPROG replied 1 year ago.
Hello thanks for requesting me
Customer: replied 1 year ago.
I am stuck i am not sure why I have so many errors.
Expert:  ATLPROG replied 1 year ago.
can you please send a snapshot of error you get
Customer: replied 1 year ago.
Pseudocode
//Program Header
//Program Name: Basic User Interface
//Programmer: Your Name
//CIS247, Week 1 Lab
//Program Description: PROVIDE A DESCRIPTITON OF THE PROGRAM
Start main
//declare variables
input as string
name as string
age as integer
mileage as double
call DisplayApplicationInformation
call DisplayDivider(“Start Program”)
call DisplayDivider(“Get Name”)
set name = GetInput(“Your Name”)
display “Your name is: “ + name
call DisplayDivider(“Get Age”)
set input = GetInput(“Your Age”)
set age = convert input to integer
display “Your age is: “ + age
call DisplayDivider(“Get Mileage”)
set input = GetInput(“Gas Mileage”)
set mileage = convert input to double
//display mileage to 2 decimal places
display “Your car MPG is: “ + mileage
call TerminateApplication
end main program
procedure DisplayApplicationInformation
display “Welcome the Basic User Interface Program”
display “CIS247, Week 1 Lab”
display “Name: YOUR NAME”
display “This program accepts user input as a string, then makes the appropriate data conversion”
end procedure
procedure DisplayDivider(string outputTitle)
display “**************** “ + outputTitle + “****************”
end procedure
function GetInput(string inputType) as string
strInput as string
display “Enter the “ + inputType
get strInput
return strInput
end function
procedure TerminateApplication
display “Thank you for using the Basic User Interface program”
exit application
end procedure
Customer: replied 1 year ago.
Error 2 error LNK2019: unresolved external symbol "void __cdecl TerminateApplication(void)" (?TerminateApplication@@YAXXZ) referenced in function _main C:\Users\RYAN\Documents\Visual Studio 2013\Projects\new\ConsoleApplication3\ConsoleApplication3\Source.obj ConsoleApplication3
Error 1 error LNK2019: unresolved external symbol "class std::basic_string,class std::allocator > __cdecl GetInput(class std::basic_string,class std::allocator >)" (?GetInput@@[email protected][email protected]@std@@[email protected]@2@@std@@V12@@Z) referenced in function _main C:\Users\RYAN\Documents\Visual Studio 2013\Projects\new\ConsoleApplication3\ConsoleApplication3\Source.obj ConsoleApplication3
Error 3 error LNK1120: 2 unresolved externals C:\Users\RYAN\Documents\Visual Studio 2013\Projects\new\ConsoleApplication3\Debug\ConsoleApplication3.exe 1 1 ConsoleApplication3
Customer: replied 1 year ago.
these are the three errors
Expert:  ATLPROG replied 1 year ago.
do you have visual studio 2012?
Customer: replied 1 year ago.
no I have 2013
Customer: replied 1 year ago.
// CIS247C_WK1_Lab_Fesler.cpp :
//Program Name: Basic User Interface
//Programmer: Ryan Fesler
//CIS247, Week 1 Lab
//Program Description: Basic User Interface#include
#includeusing namespace std;void DisplayApplicationInformation();
void DisplayDivider(string message);
string GetInput(string message);
void TerminateApplication();int main()
{
string name;
string input;
int age;
double mileage;
DisplayApplicationInformation();
DisplayDivider("Start Program");
DisplayDivider("Get Name");
name = GetInput("Your Name");
cout << "Your name is " << name << endl;
DisplayDivider("Get Age");
input = GetInput("Your Age");
age = atoi(input.c_str());
cout << "Your age is " << age << endl;
DisplayDivider("Get Mileage");
input = GetInput("Your mileage");
mileage = atof(input.c_str());
cout << "Your car MPG is " << mileage << endl;
TerminateApplication();
return 0;
}void DisplayApplicationInformation()
{
cout << "Welcome the Basic User Interface Program " << endl;
cout << "CIS247, Week 1 Lab" << endl;cout << "Name: YOUR NAME" << endl;
cout << "This program accepts user input as a string, then makes the appropriate data conversion" << endl;
}void DisplayDivider(string outputTile)
{cout << "**********************" << outputTile
<< "******************" << endl;
}
Customer: replied 1 year ago.
not sure if you got my code that i am using
Expert:  ATLPROG replied 1 year ago.
i am give me a few. i will send you a project
Customer: replied 1 year ago.
awesome thank you.
Expert:  ATLPROG replied 1 year ago.
Please download modified code from
http://pastebin.com/8dErtBaD
I hope i was able to assist you. If you are happy with my service please rate my service . If your are not 100% satisfied, please reply to me so that i can help you better.
Please start your question with "For ATLProg only" to request me again
Please bookmark my profile page http://www.justanswer.com/computer/expert-atlprog/ so you can come back and ask me a question anytime.
Useful resources: https://ww2-secure.justanswer.com/help/do-i-have-rate-answer http://ww2.justanswer.com/help/how-do-i-rate-answer-hl
Customer: replied 1 year ago.
Thank You....What did I do wrong?
Expert:  ATLPROG replied 1 year ago.
It was missing GetInput and TerminateApplication function implementation at the end.
Please start your question with "for atlprog" to request me next time you need help and remember to rate this one
Expert:  ATLPROG replied 1 year ago.
http://pastebin.com/8dErtBaD
I hope i was able to assist you. If you are happy with my service please rate my service . If your are not 100% satisfied, please reply to me so that i can help you better.
Please start your question with "For ATLProg only" to request me again
Please bookmark my profile page http://www.justanswer.com/computer/expert-atlprog/ so you can come back and ask me a question anytime.
Useful resources: https://ww2-secure.justanswer.com/help/do-i-have-rate-answer http://ww2.justanswer.com/help/how-do-i-rate-answer-hl
I hope i was able to assist you. If you are happy with my service please rate my service . If your are not 100% satisfied, please reply to me so that i can help you better.
Please start your question with "For ATLProg only" to request me again