Welcome back, all!
I will be posting my college days adventure in this blog. So far I have taken or are taking the following classes since my return to school.
Beginning Java
Project Management
Beginning Visual Basic
Beginning C++
Introduction to Computer Security
U.S. History II
And here's a program I wrote in school that earn a grade of A and was shown to everyone in class as to the proper way to write a program.
It is a very basic C++ program. It is self-explanatory. You can run it if you have a C++ compiler in your computer.
/****************************************************************************
Name: John Sindayen
Class Name: CIT 133 Beginning C++
Section Number: 1001
Programming Assignment Number: 3
Date Assigned: 9/2/13
Date Due: 9/9/13
****************************************************************************/
/****************************************************************************
This C++ source code contains 3 different programs.
Variables used inside main function.
GREETING: greeting begins each program.
inputEnter: user input variable before exiting program.
****************************************************************************/
// Include header files in preprocessor directives.
#include <iostream> //Needed for input and output operations.
#include <string> //Needed to declare string objects.
#include <iomanip> //Needed to set precision for first program.
// State namespace to use in this statement.
using namespace std; //Needed to simplify syntax of iostream objects.
// Begin main function.
int main() //Main function header starts the program.
{
//Declare named constants.
const string GREETING= "W E L C O M E T O P R O G R A M # ";
//Welcome user to the programs.
cout << "Welcome to our program.\n"
<< "There are three sets of programs.\n\n";
//Greet user to first program.
cout << GREETING << "1\n\n\n";
//***************************************************************************
// First Program: Adding Taxes To A Purchase
//
// Program asks user to enter amount of purchase for an item.
// Program then computes the federal, state and county taxes.
// This program uses a state tax of 8%, a federal tax of 12%, and a
// county tax of 3%.
// Program then displays the amount of purchase, all three taxes, and
// the purchase amount that includes all three taxes.
//
// Input variable of this program:
// purchaseAmount: purchase amount of item.
//
// Named constant variables of this program:
// FEDERAL_TAX_RATE: federal tax rate in decimal.
// STATE_TAX_RATE: state tax rate in decimal.
// COUNTY_TAX_RATE: county tax rate in decimal.
//
// Output variables of this program:
// federalTax: federal tax of item.
// stateTax: state tax of item.
// countyTax: county tax of item.
// purchaseAmountWithTaxes: final price of item including all 3 taxes.
//***************************************************************************
//Declare named constants.
const double FEDERAL_TAX_RATE = 0.12;
const double STATE_TAX_RATE = 0.08, COUNTY_TAX_RATE = 0.03;
//Declare local variables.
double purchaseAmount; //Purchase amount of an item.
double purchaseAmountWithTaxes; //Price including all three taxes.
double federalTax, stateTax, countyTax;
purchaseAmount = 0; //Initialize the purchase amount to 0.
//Ask user to enter amount of purchase.
cout << "Please enter the amount of purchase for the item: ";
cin >> purchaseAmount; //Assign purchase amount to a variable.
//Calculate all three taxes.
federalTax = purchaseAmount * FEDERAL_TAX_RATE;
stateTax = purchaseAmount * STATE_TAX_RATE;
countyTax = purchaseAmount * COUNTY_TAX_RATE;
purchaseAmountWithTaxes = purchaseAmount + federalTax + stateTax
+ countyTax; //Adds up all taxes and the purchase amount.
//Display the purchase amount, the tax rates, the tax amounts, and
//the final price.
cout << setprecision(2) << fixed; //sets numbers to 2 decimal places.
cout << "\nSUMMARY OF YOUR PURCHASE OF THE ITEM:\n\n";
cout << "Purchase Amount of Item: $" << purchaseAmount << endl;
cout << FEDERAL_TAX_RATE * 100 << "% Federal Tax for Item: $"
<< federalTax << endl;
cout << STATE_TAX_RATE * 100 << "% State Tax for Item: $"
<< stateTax << endl;
cout << COUNTY_TAX_RATE * 100 <<"% County Tax for Item: $"
<< countyTax << endl << endl; //leaves blank line.
cout << "Final Purchase Price of Item: $" << purchaseAmountWithTaxes
<< endl << endl; //leaves blank line.
//Greet user to second program.
cout << "\n\n" << GREETING << "2\n\n\n";
//***************************************************************************
// Second Program: Simple Word Game
//
// Program asks user to enter name, age, city, and an abbreviated college
// name. This program assumes that none of the input values have spaces
// in them.
// Program then displays the following story replacing the user’s input
// in appropriate locations:
// A person named "name" who lived in "city" was "age" years old and goes
// to a college named "abbreviated college name".
//
// Input variables of this program:
// name: name entered by user.
// age: age entered by user.
// city: city entered by user.
// collegeName: abbreviated college name entered by user.
//
// Output variables of this program are all the input variables.
//***************************************************************************
//Declare local variables.
string name, city, collegeName;
int age;
//Ask user for name, age, city, and abbreviated college name.
cout << "Please enter the following information:" << endl;
cout << "Your Name: ";
cin >> name;
cout << "Your Age: ";
cin >> age;
cout << "Your City: ";
cin >> city;
cout << "Your abbreviated College Name (Example, CSN): ";
cin >> collegeName;
//Display the following story output.
cout << "A person named " << name << " who lived in " << city
<< " was " << age << " years old and goes to a college named "
<< collegeName << "." << endl << endl;
//Greet user to third program.
cout << "\n\n" << GREETING << "3\n\n\n";
//***************************************************************************
// Third Program: Elapse Time In Seconds
//
// Program asks user to input the elapsed time for an event in hours,
// minutes, and seconds. The program then outputs the elapsed time in
// seconds.
//
// Input variables of this program:
// hours: hours of elapsed time.
// minutes: minutes of elapsed time.
// seconds: seconds of elapsed time.
//
// Output variable of this program:
// elapsedTimeInSeconds: total elapsed time in seconds.
//***************************************************************************
//Declare local variables.
int hours, minutes, seconds, elapsedTimeInSeconds;
//Ask user to input elapsed time in hours, minutes, and seconds.
cout << "Please enter the elapsed time for an event in hours, "
<< "minutes, and seconds.\n";
cout << "Hours: ";
cin >> hours; //Object cin automatically returns new line.
cout << "Minutes: ";
cin >> minutes; //Object cin automatically returns new line.
cout << "Seconds: ";
cin >> seconds; //Object cin automatically returns new line.
//Compute elapsed time by converting hours into seconds and
//minutes into seconds and adding all the seconds together.
elapsedTimeInSeconds = (hours * 60 * 60) + (minutes * 60) + (seconds);
//Display elapsed time into seconds.
cout << "\nYour elapsed time in seconds is " << elapsedTimeInSeconds
<< " seconds.\n\n";
//Display end of all 3 programs and end program.
char inputEnter; //used to display the following statements.
cout << "You have reached the end of our programming for today.\n";
cout << "Thank you for watching and participating in these "
<< "interactive programs." << endl << endl; //double space.
//Ask user to enter any letter to exit program.
cout << "Please press any letter then Enter to exit program: ";
cin >> inputEnter; //user input to exit program.
return 0; //Tells compiler execution underwent normal success.
} //Ends main function.
John Sindayen
It's all about stuff like math, algebra, computer science, programming, astronomy, physics, engineering, accounting, history, art, literature, etc., i.e.: e = mc2 or Et Cetera = Mathematics * Computers2.
Wednesday, November 6, 2013
Tuesday, August 6, 2013
VRAP
STARS AND STRIFE
Everybody has stars in their eyes, that they would find success in life and live happily ever after, or any facsimile thereof. And everybody has good opportunities that come into their life, all for the taking or simply letting slip by.
VRAP or Veterans Retraining Assistance Program is a good opportunity for a veteran to further his education to obtaining a job or a new career. It is a program by the Veterans Administration to provide veterans a monthly allowance for attending college as a full time student. The VA gives you up to $1,500 monthly to go back to college or go to college for the first time. However, there are many limitations and many restrictions. Google VRAP.
The VRAP program is ending on April 1, 2014 and will pay only up to your March 2014 full time college attendance. After that, you are on your own to complete whatever you have started in college. And this is only one of many caveats of being a VRAP participant. The following list some of the major caveats for a VRAP participant.
1. You must be a full time student as define by the school or college you are attending.
2. You must pass all your courses or you will owe all the money given to you.
3. You cannot take repeated courses or you will owe all the money given to you.
4. Your first and last months payments are partial to the starting and end dates of matriculation.
5. You cannot take courses that the VA says are equivalent to courses you've already taken.
Consult your VA school representative for further limitations and restrictions.
I am in the VA program and it has been stars and strife for me in dealing with the college personnel and post college personnel. For example, California State University of Los Angeles mailed a transcript to College of Southern Nevada that was a blank paper. It was totally unprofessional.
So decide for yourself whether you really want to go to college and spend all your time or most of your time studying. Or take an easy major, like the culinary arts. That's cooking school, in layman's language.
Everybody has stars in their eyes, that they would find success in life and live happily ever after, or any facsimile thereof. And everybody has good opportunities that come into their life, all for the taking or simply letting slip by.
VRAP or Veterans Retraining Assistance Program is a good opportunity for a veteran to further his education to obtaining a job or a new career. It is a program by the Veterans Administration to provide veterans a monthly allowance for attending college as a full time student. The VA gives you up to $1,500 monthly to go back to college or go to college for the first time. However, there are many limitations and many restrictions. Google VRAP.
The VRAP program is ending on April 1, 2014 and will pay only up to your March 2014 full time college attendance. After that, you are on your own to complete whatever you have started in college. And this is only one of many caveats of being a VRAP participant. The following list some of the major caveats for a VRAP participant.
1. You must be a full time student as define by the school or college you are attending.
2. You must pass all your courses or you will owe all the money given to you.
3. You cannot take repeated courses or you will owe all the money given to you.
4. Your first and last months payments are partial to the starting and end dates of matriculation.
5. You cannot take courses that the VA says are equivalent to courses you've already taken.
Consult your VA school representative for further limitations and restrictions.
I am in the VA program and it has been stars and strife for me in dealing with the college personnel and post college personnel. For example, California State University of Los Angeles mailed a transcript to College of Southern Nevada that was a blank paper. It was totally unprofessional.
So decide for yourself whether you really want to go to college and spend all your time or most of your time studying. Or take an easy major, like the culinary arts. That's cooking school, in layman's language.
Tuesday, July 30, 2013
A TRILOGY
Welcome To Knight In World Blog!
Knight In World is part of the trilogy blogs complementing Knight In Math and Knight In Business blogs.
The format for Knight In Business blog has been changed. The subject composition will still be the same, but the topics to be discussed will be limited, generally, to these academic subjects: Java Programming Language, Project Management, C++ Programming Language, Computer Science, Visual Basic Programming Language, Computer Technology, and Microsoft Software.
The format for Knight In Math will discussed math level skills from kindergarten, grade 1 to 12, college freshman to senior, and postgraduate math. Additionally, science topics from grade 1 to 12 will be discussed weekly.
The format for Knight In World encompasses academic subjects not discussed in these two blogs, as well as contemporary events.
This trilogy is limited to at least 1,000 words weekly.
Knight In World is part of the trilogy blogs complementing Knight In Math and Knight In Business blogs.
The format for Knight In Business blog has been changed. The subject composition will still be the same, but the topics to be discussed will be limited, generally, to these academic subjects: Java Programming Language, Project Management, C++ Programming Language, Computer Science, Visual Basic Programming Language, Computer Technology, and Microsoft Software.
The format for Knight In Math will discussed math level skills from kindergarten, grade 1 to 12, college freshman to senior, and postgraduate math. Additionally, science topics from grade 1 to 12 will be discussed weekly.
The format for Knight In World encompasses academic subjects not discussed in these two blogs, as well as contemporary events.
This trilogy is limited to at least 1,000 words weekly.
Subscribe to:
Comments (Atom)