Thanks all that have helped me get this C++ program going.
-----
1. Problem: The program is not adding up the data correctly? The OBVERSE data adds up... The REVERSE data either adds 3 points (win 8.1) on one machine and 89 points on another machine (Win 7)
Now when I run it on here- perfect! weird!? just enter 1 for OBVERSE & REVERSE and see.
2. I tried to download a Program to convert C++ to Android APPs... and there seems to be alot of them. Some of these cost 2000 bucks? Crazy or what?
CAN someone with experience please tel me which one to download for FREE.
I only have one APP and it's this one.
Tony
#include <iostream>
#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
usingnamespace std;
/**
This program is WORK IN PROGRESS!
As time goes on, I will improve it but right now it's pretty RAW
This is a way to grade your USA Notes.... It's your grade! It's a Value just for YOU.
Be Honest, it's your system
Watch for upgrades to this program
Thank you for Collecting USA Currency
*********/
int main()
{
cout << "Program is up top date as of May 14th 2015";
std::cout << std::endl;
std::cout << std::endl;
cout << "Anyone can grade a USA NOTE, all you have to do is Practice.";
std::cout << std::endl;
cout << "The attributes are very similar to the Professional Grading Companies." ;
std::cout << std::endl;
cout <<"The exception: this is a FREE system & uses a Scale from 1 to 100";
std::cout << std::endl;
cout << "Please enter up to the MAX values that are indicated or there will be an error";
std::cout << std::endl;
cout << "It is strickly for Circulated Currency";
std::cout << std::endl;
cout << "Go here for WHY: http://www.circulatedcurrency.com/free/1/index.html" ;
std::cout << std::endl;
std::cout << std::endl;
std::cout << std::endl;
int date;
int serial;
int corners;
int tears;
int ink;
int holes;
int color;
int dirt;
int smears;
int margins;
int folds;
int overall;
int stains;
int score;
int ironed;
int stop;
int x;
int corners2;
int tears2;
int ink2;
int holes2;
int color2;
int dirt2;
int smears2;
int margins2;
int folds2;
int overall2;
int stains2;
int score2;
int ironed2;
// need to start on the Obverse side of the note
string mystring;
cout << "Please enter the entire serial number ";
cin >> mystring; ".\n";
cout << "Are you looking at the OBVERSE side of a note: 0=yes ";
cin >> x; ".\n";
cout << "Look at the CORNERS on a scale from 0 to 5 look at the corners:";
cin >> corners; ".\n";
cout <<"Look to see if there any Tears -scale 0 to 5 enter TEARS:";
cin >> tears; ".\n";
cout <<"For Pencil or INK scale from 0 to 10 enter:";
cin >> ink; ".\n";
cout <<"Look to see if the Note had been Pressed or IRONED scale from 0 to 5 enter:";
cin >> ironed; ".\n";
cout <<"Look to determine Crinkles or Holes scale from 0 to 10 enter:";
cin >> holes; ".\n";
cout <<"Look at the Color scale from 0 to 10 enter:";
cin >> color; ".\n";
cout <<"Look at note if it's DIRTY scale from 0 to 5 enter: " ; ".\n";
cin >> dirt; ".\n";
cout <<"Look for INK Smears scale from 0 to 5 enter: " ; ".\n";
cin >> smears; ".\n";
cout <<"Look for Stains scale from 0 to 10 enter: " ; ".\n";
cin >> stains; ".\n";
cout <<"Look to see if the Margins are EVEN scale from 0 to 5 enter: " ; ".\n";
cin >> margins; ".\n";
cout <<" Look to see how many Folds scale from 0 to 10 enter: " ; ".\n";
cin >> folds; ".\n";
cout <<"Determine the Overall condition scale from 0 to 20 enter: " ; ".\n";
cin >> overall; ".\n";
score += corners + tears + ink + ironed + holes + color + dirt + smears + stains + margins + folds + overall ; ".\n";
cout << "Total Condition>>OBVERSE is " << score; ".\n";
std::cout << std::endl;
std::cout << std::endl;
// for the reverse
cout << "Are you looking at the REVERSE side of a note: 0=yes"; ".\n";
cin >>x; ".\n";
x==0;
cout << "Look at the CORNERS on a scale from 0 to 5 look at the corners:"; ".\n";
cin >> corners2; ".\n";
cout <<"Look to see if there any Tears scale 0 to 5 enter TEARS:"; ".\n";
cin >> tears2; ".\n";
cout <<"For Pencil or INK scale from 0 to 10 enter:"; ".\n";
cin >> ink2; ".\n";
cout <<"Look to see if the Note had been Pressed or IRONED scale from 0 to 5 enter:"; ".\n";
cin >> ironed2; ".\n";
cout <<"Look to determine Crinkles or Holes scale from 0 to 10 enter:"; ".\n";
cin >> holes2; ".\n";
cout <<"Look at the Color scale from 0 to 10 enter:"; ".\n";
cin >> color2; ".\n";
cout <<"Look at note if it's DIRTY scale from 0 to 5 enter: " ; ".\n";
cin >> dirt2; ".\n";
cout <<"Look for INK Smears scale from 0 to 5 enter: " ; ".\n";
cin >> smears2; ".\n";
cout <<"Look for Stains scale from 0 to 10 enter: " ; ".\n";
cin >> stains2 ; ".\n";
cout <<"Look to see if the Margins are EVEN scale from 0 to 5 enter: " ; ".\n";
cin >> margins2 ; ".\n";
cout <<" Look to see how many Folds scale from 0 to 10 enter: " ; ".\n";
cin >> folds2; ".\n";
cout <<"Determine the Overall condition scale from 0 to 20 enter: " ; ".\n";
cin >> overall2; ".\n";
// x==0;
score2 += corners2 + tears2 + ink2 + ironed2 + holes2 + color2 + dirt2 + smears2 + stains2 + margins2 + folds2 + overall2 ; ".\n";
std::cout << std::endl;
//change color of Output data
// system ("xy")
// x-is the background color
// y-is the test color
//0=Black 8=gray
// 1=blue 9=light blue
// 7=white f=bright white
system ("color f1");
std::cout << std::endl;
std::cout << std::endl;
std::cout << std::endl;
cout << "The Serial number is" <<"=" << mystring; ".\n";
std::cout << std::endl;
std::cout << std::endl;
cout << "Total for Obverse=" << score; ".\n";
std::cout << std::endl;
cout << "Max-5 Corners" << "=" << corners; ".\n";
std::cout << std::endl;
cout << "Max-5 Tears:" << "=" << tears; ".\n";
std::cout << std::endl;
cout << "Max-10 Pencil/Ink" << "=" << ink; ".\n";
std::cout << std::endl;
cout << "Max-5 Pressed/Ironed" << "=" << ink; ".\n";
std::cout << std::endl;
cout << "Max-10 Crinkles/Holes" << "=" << holes; ".\n";
std::cout << std::endl;
cout << "Max-10 Color" << "=" << color; ".\n";
std::cout << std::endl;
cout << "Max-5 Dirt" << "=" << dirt; ".\n";
std::cout << std::endl;
cout << "Max-5 Ink SMEARS" << "=" << smears; ".\n";
std::cout << std::endl;
cout << "Max-10 Stains" << "=" << stains; ".\n";
std::cout << std::endl;
cout << "Max-5 Margins" << "=" << margins; ".\n";
std::cout << std::endl;
cout << "Max-10 Folds" << "=" << folds; ".\n";
std::cout << std::endl;
cout << "Max-20 OVERALL" << "=" << overall; ".\n";
std::cout << std::endl;
std::cout << std::endl;
std::cout << std::endl;
// x==0;
cout << "The Serial number is" <<"=" << mystring; ".\n";
std::cout << std::endl;
std::cout << std::endl;
cout << "Total for Reverse" << "=" << score2; ".\n";
std::cout << std::endl;
cout << "Max-5 Corners" << "=" << corners2; ".\n";
std::cout << std::endl;
cout << "Max-5 Tears" << "=" << tears2; ".\n";
std::cout << std::endl;
cout << "Max-10 Pencil/Ink" << "=" << ink2; ".\n";
std::cout << std::endl;
cout << "Max-5 Pressed/Ironed" << "=" << ironed2; ".\n";
std::cout << std::endl;
cout << "Max-10 Crinkles/Holes" << "=" << holes2; ".\n";
std::cout << std::endl;
cout << "Max-10 Color" << "=" << color2; ".\n";
std::cout << std::endl;
cout << "Max-5 Dirt" << "=" << dirt2; ".\n";
std::cout << std::endl;
cout << "Max-5 Ink SMEARS" << "=" << smears2; ".\n";
std::cout << std::endl;
cout << "Max-10 Stains" << "=" << stains2; ".\n";
std::cout << std::endl;
cout << "Max-5 Margins" << "=" << margins2; ".\n";
std::cout << std::endl;
cout << "Max-10 Folds" << "=" << folds2; ".\n";
std::cout << std::endl;
cout << "Max-20 OVERALL" << "=" << overall2; ".\n";
std::cout << std::endl;
std::cout << std::endl;
std::cout << std::endl;
//cout << endl;
// cin.get(); got check this
".";
".";
system ("PAUSE");
return 0;
}
I'm pretty sure that Android Studio works with JDK. I guess this means you'll need to convert this code to Java so that you can create an .apk for distribution?
2. I tried to download a Program to convert C++ to Android APPs... and there seems to be alot of them. Some of these cost 2000 bucks? Crazy or what?
CAN someone with experience please tel me which one to download for FREE.
I only have one APP and it's this one.
If all you need to do is convert this program over to Java there is no need to buy or even download a free one to do the conversion.
At most this program just uses basic programming principles that are pretty much the same in most languages (Especially Java and C++) so it shouldn't take more then a few hours to a day (If you are still just learning) to convert the code from C++ to Java. And that estimate is on the high end.
Since you mentioned wanting to do some stuff with Android that will take some more time to learn about but you would still need to learn about it even with a conversion application.
So long story short if you want to convert this to Java just do it by hand there is no use wasting the time to find a good conversion software to do it for you, since more then likely that will take you more time then to do it yourself.
Thanks Texan40 & Zereo for the information.... experience is the best bet! I don't think I want to be a Programmer...at least not yet.
I AM CURIOUS! Did you look at the REASON for the Math calculation being WRONG? OBVERSE is Correct, but REVERSE is wrong. either a 3 or an 83 -Crazy huh? I've tried everything, well almost.... and still haven't gotten close. YET here, it works every time, WEIRD WEIRD!
The scores are weird because you are adding to score and score2 at lines 123 and 174, but you don't initialize those variables to zero. Fix that and it will be fine.
Notice that the code for getting the details of the obverse and reverse sides is nearly identical. You could factor this out by creating a class that holds the details for a side. A method can prompt the users for the details and the main program can tell the user which side's details to enter.
cout << "Total for Reverse" << "=" << grade; ".\n";
===========
BUT it added 15--> 3 points ???
I've changed these variables.... and that didn't work! I thin tried running this program on my Win 7 laptop.... and it added up as 89.... (very weird)
When the program runs on this system it's correct 12 -- by entering all 1's
OH MY GOSH! I download Android Studio! then I downloaded JAVA --then I tried to watch a Tutorial video .... I am overwhelmed! I thought C++ was confusing when I first downloaded DEV-C++ ..... but this android studio....WOW
No where did I find C++ to import? I thought that C++ and android were CLOSE? NOPE!
SO now I'm learning Android! It almost looks like C++ yikes
Tony