68
Final Requirement in Fundamentals of Programming Submitted by: Astor, Rafael B. BM10203 Submitted to: Mr. Erwin Globio October 11, 2012 http:// eglobiotraining.co

Astor rafael b. bm10203 - final requirement in fundamentals of programming

  • Upload
    raffx14

  • View
    179

  • Download
    2

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Final Requirement in Fundamentals of

Programming

Submitted by: Astor, Rafael B. BM10203

Submitted to: Mr. Erwin Globio

October 11, 2012http://eglobiotraining.com

Page 2: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Before I start…

Lets first define and discuss the programming software I used to made the final requirement programs for this course. And lets also define what is Looping and Switch Case.

http://eglobiotraining.com

Page 3: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Dev-C++

Dev-C++ is a free integrated development environment (IDE) distributed under the GNU General Public License for programming in C and C++. MinGW, a free compiler, is bundled with it. The IDE is written in Delphi.The project is hosted by SourceForge. Dev-C++ was originally developed by programmer Colin Laplace. Dev-C++ runs exclusively on Microsoft Windows.Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C and C++ programming languages.

http://eglobiotraining.com

Page 4: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

What is Switch-Case?The switch-case statement is a multi-way decision statement. Unlike the multiple decision statement that can be created using if-else, the switch statement evaluates the conditional expression and tests it against numerous constant values. The branch corresponding to the value that the expression matches is taken during execution. The value of the expressions in a switch-case statement must be an ordinal type i.e. integer, char, short, long, etc. Float and double are not allowed because programming language software will reject it.

The case statements and the default statement can occur in any order in the switch statement. The default clause is an optional clause that is matched if none of the constants in the case statements can be matched.

http://eglobiotraining.com

Page 5: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

What is Looping?Loops allow for the same statement to be executed a number of times in succession. There are three different loop constructs that can be used depending on whether the number of repetitions is known and also (where the number of repetitions is not known and is dependent on a condition) whether the loop is allowed to be bypassed if the termination condition is met before the loop is first executed. It is usually used in Programming.

http://eglobiotraining.com

Page 6: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

What is Loop-Switch?A loop-switch sequence (also known as the for-case paradigm or Anti-Duff's Device) is a programming antipattern where a clear set of steps is implemented as a switch-within-a-loop. The loop-switch sequence is a specific derivative of spaghetti code.It is not necessarily an antipattern to use a switch statement within a loop—it is only considered incorrect when used to model a known sequence of steps. The most common example of the correct use of a switch within a loop is an event handler. In event handler loops, the sequence of events is not known at compile-time, so the repeated switch is both necessary and correct (see event-driven programming, event loop and event-driven finite state machine).

http://eglobiotraining.com

Page 7: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Switch-Loops Programs

http://eglobiotraining.com

Page 8: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Switch-Loops Program # 1-Jollibee Counter Order Taker

Program-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 9: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

1st Switch-Loop Program – Jollibee Counter Order Taker

Program

This Jollibee Counter Order Taker is a type of program which shows the systematic way of processing the ordered food and the system of payments and changes. This is not a simple program because its one of the most helpful that a programmer can make. It can be use on businesses by programming and editing some of the codes inside it to fit on your business type.

http://eglobiotraining.com

Page 10: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Jollibee Counter Order Taker Program

http://eglobiotraining.com

Page 11: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Jollibee Counter Order Taker Program

http://eglobiotraining.com

Page 12: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Jollibee Counter Order Taker Program

http://eglobiotraining.com

Here is the list of foods and their prices. You just need to choose and enter the code of choice to process the ordered food.

Page 13: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Jollibee Counter Order Taker Program

http://eglobiotraining.com

After that, You will be asked of how many quantity and how much money the customer will going to tendered to subtract the amount from the sold product.

Page 14: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Jollibee Counter Order Taker Program

http://eglobiotraining.com

After that, you will now able to see the result of the transaction together with the amount of change of the customer from the tendered money.

Page 15: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Switch-Loops Program # 2-LRT Ticket Route Program-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 16: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

1st Switch-Loop Program – LRT Ticket Route Program

LRT Ticket Route Program is one of the most complicated Program in my Requirements that needs to be checked and seen by my friends with Programming courses to make it work. This is an amazing program that can process the tickets of the passengers of the LRT 1 station. This is very helpful if this will be developed more by the programmers and improve thru higher technology to be use in the public transportation services and facilities.

http://eglobiotraining.com

Page 17: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of LRT Ticket Route Program

http://eglobiotraining.com

Page 18: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of LRT Ticket Route Program

http://eglobiotraining.com

Page 19: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of LRT Ticket Route Program

http://eglobiotraining.com

Page 20: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The LRT Ticket Route Program

http://eglobiotraining.com

The first thing you must do is to choose your desired destination and put the destination code in the Coding Area.

Page 21: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The LRT Ticket Route Program

http://eglobiotraining.com

After that, you will put the amount tendered and the program will give you the destination route and the fees and amount change for the transaction in LRT 1.

Page 22: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Switch-Case Programs

http://eglobiotraining.com

Page 23: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Switch Program # 1-UAAP CDC Voter Program-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 24: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

1st Switch Program – UAAP CDC Voter Program

A voting type of program which allow the people to vote for their winner for the UAAP annual Cheer Dance Competition. While Im programming the codes, I was thinking of the declaration of CDC winner must not just depend on the judges but also in public demand. It’s a useful program especially for Students who are involve in UAAP.

http://eglobiotraining.com

Page 25: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of UAAP CDC Voter Program

http://eglobiotraining.com

Page 26: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of UAAP CDC Voter Program

http://eglobiotraining.com

Page 27: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The UAAP CDC Voter Program

First, The program will ask if what cheer dance troupe you want to vote as winner.

http://eglobiotraining.com

Page 28: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The UAAP CDC Voter Program

Then , every program choices will define the characteristics of you chosen group of cheerdancers. And after that, your vote will be counted.

http://eglobiotraining.com

Page 29: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Switch Program # 2-Favorite T.V. Show Program-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 30: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

2nd Switch Program – Favorite T.V. Show Program

A type of programming element that has been made to know the popularity of a certain TV shows. It’s a kind of voting system whereas people have to vote for their favorite T.V. show particularly in ABS-CBN.

http://eglobiotraining.com

Page 31: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Favorite T.V. Show Program

http://eglobiotraining.com

Page 32: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Favorite T.V. Show Program

There are choices of ABS-CBN given on the program.

http://eglobiotraining.com

Page 33: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Favorite T.V. Show Program

http://eglobiotraining.com

After Choosing, It will count your vote and will give you small information about your chosen option

Page 34: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Switch Program # 3-Grade Estimator Program-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 35: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

3rd Switch Program – Grade Estimator Program

The grade estimator Program is just a very simple program that allows students to see their estimated grades for the semester.

http://eglobiotraining.com

Page 36: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Grade Estimator Program

http://eglobiotraining.com

Page 37: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Grade Estimator Program

http://eglobiotraining.com

Enter your grade Equivalent on the Console of the Programming software (C++)

Page 38: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Grade Estimator Program

http://eglobiotraining.com

After that, it will tell you if you’re grade is passing or not.

Page 39: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Switch Program # 4-Order Taker for Dinner-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 40: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

4TH Switch Program – Order Taker for Dinner-

Order taker Allows people to process their ordered food in the counter. If they will order a food, the program will be the one In charge to bring the information on the main computer and process it to let the chef and cooks know the order taken in the counter.

http://eglobiotraining.com

Page 41: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Order Taker for Dinner

http://eglobiotraining.com

Page 42: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Order Taker for Dinner

http://eglobiotraining.com

Page 43: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Order Taker for Dinner

http://eglobiotraining.com

Choose from the menu given in the program

Page 44: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Order Taker for Dinner

http://eglobiotraining.com

Then see the advice and small information given by the program to gain ideas about the food you ordered…

Page 45: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Looping Programs

http://eglobiotraining.com

Page 46: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Looping Program # 1-The Lotto Drawer-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 47: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

1st Looping Program – Lotto Drawer

This is the 1st program I prepared in Fundamentals of programming which can let you a virtual lotto drawer. You can play as much as you want and using this program can benefit many people if the programmers will improve it to be used in actual lotto draws. The programming process and encoding is not purely from my own knowledge but I seek for the advise of my friends who knows so much about fundamentals of programming.

http://eglobiotraining.com

Page 48: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Lotto Drawer Program

http://eglobiotraining.com

Page 49: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Lotto Drawer Program

http://eglobiotraining.com

Page 50: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running the Lotto Drawer Program

When you run the program, you will be asked if what number would you like to enter for your desired Lotto. Numbers In the world of programming Language, playing this kind of game is not necessary. But we can do programs that could develop the Lotto Drawing System.

http://eglobiotraining.com

Page 51: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running the Lotto Drawer Program

After that, you will now put the desired numbers one by one...

http://eglobiotraining.com

Page 52: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running the Lotto Drawer Program

http://eglobiotraining.com

Page 53: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running the Lotto Drawer Program

After you enter the numbers, the winning numbers will appear and you will be asked by the program if you will play again or not by answering yes or no (Y/N). Programming and encoding the codes of this program is not easy yet very satisfying ones you finished it.

http://eglobiotraining.com

Page 54: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Looping Program # 2-The Lotto Drawer-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 55: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

2nd Looping Program – Currency Converter

This is a useful program I made for the requirements in Fundamentals of programming that can convert the currency (Pounds GBP – Philippine Peso) . A very helpful program especially for travelers that can convert their pounds or GBP currency into our Philippines Peso. For some programmers, they can improve this by adding more choices to convert with by adding some codes to be encoded to be use in programming process.

http://eglobiotraining.com

Page 56: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Currency Converter

http://eglobiotraining.com

Page 57: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running The Currency Converter Program

First, you will be ask the amount of pound/s (GBP) to be converted

http://eglobiotraining.com

Page 58: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running the Currency Converter Program

After you put an amount, you will instantly get the equivalent amount in peso currency.

http://eglobiotraining.com

Page 59: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Looping Program # 3-Number Counter Program-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 60: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

3rd Looping Program – The Number Counter Program

This is a useful program I made in the full requirement of Fundamentals of programming which allows you to put a digit number and let it count from 1 up to your given number.

http://eglobiotraining.com

Page 61: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Number Counter

http://eglobiotraining.com

Page 62: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running the Number Counter

You will simply put a number and it will start counting from 1 up to your given digits. (example 1-20)

http://eglobiotraining.com

Page 63: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Looping Program # 4-Compound Interest Program-

http://eglobiotraining.com

Program – Requirement in Fundamentals of Programming

Page 64: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

4th Looping Program – Compound Interest Program

A simple program that shows the compound interest a given amount of money. This a simple yet good program for programming and even non-programming courses who have Math of Investment Subject.

http://eglobiotraining.com

Page 65: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

The Codes of Compound Interest Program

http://eglobiotraining.com

Page 66: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

Running the Compound Interest Program

This just simply shows the compounded amount on deposit of a certain given amount. (on the example is 250,000 php)

http://eglobiotraining.com

Page 67: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

http://eglobiotraining.com

As part of the requirement, this is Uploaded on Slideshare.net

Page 68: Astor rafael b.   bm10203 - final requirement in fundamentals of  programming

http://eglobiotraining.com

END OF PRESENTATION

Requirement for the Finals in Fundamentals of Programming

Prepared by: Astor, Rafael B. (BM10203)