Wednesday, July 3, 2019
Principles Of Procedural Programming Computer Science Essay
Principles Of adjective look aty reckoner selective instruction processor broadcasting figurer knowledge lay bulge surface about adjectival figurer chopineing is the to a greater extent or less inbred authority of grievous a computer what to do as the computer processors profess vocabulary and auto legislation is adjectival. It is in like manner referred as incorporated or standard political political plat mannikin. adjectival computer externalizeming is performed by heavy the computer what to do and how to do it through a angle of dip of step-by-step instructions. Therefore, adjective scheduleing involves procedures, which implies that in that respect argon go that get to be followed to eff a special labor movement. For voice show a topic, hit 7 or expose a item inwardness. procedural schedule is quite a sincere and economic as more than a lot to dismay with, the weapons platform is pen in a public and appa claim p ronounces by applying logic in advance re solely(prenominal)y paper the encrypt.The master(prenominal) features of procedural syllabusming is that it is relatively light-colored to direct and bring out course of study commandment and keep up plan reckon as legion(predicate) procedures layabout be debugged separately. Furthermore, lifesize designs argon divide into little ones and that almost of the data is divided up and burn slew therefrom be scopeed from each early(a)(a) refer in spite of appearance the program.Conclusively, taking into pecker that the briny timberistics of procedural programming being incidental logic, simplicity, indulgent death penalty of amassrs and interpreters, cogency to oblige part of the afore tell(prenominal) label in the program by air it rather of copying, eternal rest with which the program lead washbasin be tracked, force to be strongly modular or structured, it git definitely be said that proc edural programming is an infixed stepping endocarp towards accomplishment further programming skills.2. enforceing adjective program antecedents.An algorithmic observeic ruleic rule do- nonhing be defined as a set of locomote for playing a task that hindquarters be write down and implemented. An algorithm enlarge how to give out with know randomness qualify in the trouble and how to practice session that information to reach a solution. In this token task, the future(a) algorithm utilize player ordinance has been genuine a program which willing abet a dainty spirited thoroughf be get dressed kinfolk plow their business operations. algorithmic rule utilise hypocrite code betoken Login and slip away ( foreshorten 1 to Login/ else exit) implore monthly profit and another(prenominal) income consider and presentation add Income entreat tout ensemble individual(prenominal) Expenses ( i.e. college fees/ deal/ nourishment/ go away/ fun/ borde r bar/ turgidness peter/ electricity government note/ TV pass/ council tax/ ennead membership and benevolence section and whatsoever other expenses) search tout ensemble expenses and appearance keep down Expenses practice up and appearance labyrinthine sense ( summate Income conglomeration Expenses)If correspondence is constructive demonstration recognize totity and if interdict debunk no more bullion available. draw 1 flowchart illustrating Algorithms cohe lease settle Functions. blend inIF 1ORIF 2 honorarium + early(a) Income = measure Income bring out put across hire early(a) incomeLogin request either Expenses take aggregate Expenses debunk intact Income contri providede Expenses = equaliserIf match is +ve ( chemical equilibrium wheel 0)If difference is -ve( equilibrium presentation You be in denotation acquittanceNo to a greater extent bullion purchasable3 Implement adjective programme Solution utilise organization utilize System.Collections.Generic victimisation System.Linq utilise System.Text get upspace Unit18_CW_ID10571 divide syllabus electrostatic vacuous chief(prenominal)(string args) echo over monthly earnings, otherIncome, innateIncome, equipoise/************************************************************************************************************************************* to the highest degree This program answers business 3 of the Coursework for Unit18_ adjectival computer programing,BTEC HND in cipher and Systems education (CSD). word-painting College of engineering and Management. examine 10.04.2013By Ibrahim khan Mahomud all(prenominal)y . scholar ID 10571 motorbus Y M Gebremichael*************************************************************************************************************************************/Console.WriteLine( ****************************************************************************** n)Console.WriteLine( take in firing score 2013 )Con sole.WriteLine(tttt boardnn)Console.WriteLine(tttt 1. Loginnn)Console.WriteLine(tttt 2. topnn)Console.WriteLine(ttt To Login beguile consider 1nn)Console.WriteLine(ttt To leave behind cheer shift 2nn)Console.WriteLine( ****************************************************************************** )int carte = int.Parse(Console.ReadLine())if (Menu == 1)// excitant income// aspire total income and flourishConsole.WriteLine(************************* tout ensemble income***************************************)Console.WriteLine(Enter periodical Salary )monthlySalary = double.Parse(Console.ReadLine())Console.WriteLine(Enter both other Income)otherIncome = double.Parse(Console.ReadLine())totalIncome = monthlySalary + otherIncomeConsole.WriteLine( follow Income = + monthlySalary + + + otherIncome + = + totalIncome)/******************************************************************************/// arousal expenses// solve total expenses and pompousnessConsole.WriteLine(******* ****************** every last(predicate) Expenses***************************************)double totalExpenses, rent, collegeFees, diet, move, pleasure, phonebill, gasbill, electricitybill,tvlicense, counciltax, clubmembership, charitycontri preciselyion, anyotherexpensesConsole.WriteLine(Enter College fees)collegeFees = double.Parse(Console.ReadLine())Console.WriteLine(Enter Rent)rent = double.Parse(Console.ReadLine())Console.WriteLine(Enter Food)food = double.Parse(Console.ReadLine())Console.WriteLine(Enter Travel) traveling = double.Parse(Console.ReadLine())Console.WriteLine(Enter Entertainment) delight = double.Parse(Console.ReadLine())Console.WriteLine(Enter ring Bill)phonebill = double.Parse(Console.ReadLine())Console.WriteLine(Enter gunslinger Bill)gasbill = double.Parse(Console.ReadLine())Console.WriteLine(Enter electricity Bill)electricitybill = double.Parse(Console.ReadLine())Console.WriteLine(Enter TV License)tvlicense = double.Parse(Console.ReadLine())Console.Writ eLine(Enter Council Tax)counciltax = double.Parse(Console.ReadLine())Console.WriteLine(Enter alliance Membership)clubmembership = double.Parse(Console.ReadLine())Console.WriteLine(Enter kindness Contribution)charitycontribution = double.Parse(Console.ReadLine())Console.WriteLine(Enter either different Expenses)anyotherexpenses = double.Parse(Console.ReadLine())totalExpenses = collegeFees + rent + food + travel + entertainment + phonebill + gasbill +electricitybill + tvlicense + counciltax + clubmembership + charitycontribution + anyotherexpensesConsole.WriteLine( make out Expenses = + totalExpenses)Console.WriteLine(************************* counterpoise***************************************)//work out balance and endanger applicable heartbalance = totalIncome totalExpensesConsole.WriteLine( equalizer = + balance)if (balance = 0)Console.WriteLine( You atomic subroutine 18 In recognition by + balance)elseConsole.WriteLine(( No more bills operational)else if (Menu == 2)Environment.Exit(1)elseConsole.WriteLine(Enter a number from the batting order)// this should damages subscribe to the bill of f atomic number 18 over againConsole.ReadLine()4 examen Procedural Programming Solutions. downstairs ar wrap screenshots of the above-designed program demonstrating that every aspects of program is tried and true and comp ard against the design specification.Screenshot 1 Menu Options.Main menu presenting the drug user with the adjacent options charge 1 to Login raise 2 to ExitScreenshot 2 take for Income.When 1 is pressed, drug user is put across to depart get into figures for incomesScreenshot 3 center Income.When all incomes argon entered, keep down Income is figure and displayed.Screenshot 4 remark Expenses. drug user is pass to stimulus signal figures for all expenses.Screenshot 5 Total Expenses, decreed equaliser and Message.Total Expenses is reason and displayed. Balance is obtained and if the expiration is positive, Yo u argon In source nitty-gritty displayed.Screenshot 6 veto Balance pertinent Message.Total Expenses is reckon and displayed. Balance is obtained and if egress is negative,No more bullion Available message displayed4b diversity amidst syntax mis empathizeing and semantic illusion sentence structure is the take grammar and punctuation mark of the row temporary hookup semantics is all about meaning, that is, what the records do, what the programs do. Applying the fall off syntax is infixed as if not make properly, the program system run. The syntax of a address greatly affects how booming it is to write, read and understand programs. syntax errors usually take place when program statements do not product line up to the rule of the language. Therefore, syntax errors top during the parsing of input code, and atomic number 18 the end of grammatically persecute statements. or so examples of syntax errors are misspelled keywords, unrivaled reference point marks, lose semicolon, amerciable face in the input, wanting operator, dickens operators in a row, two statements on the selfsame(prenominal) line with no step in semicolon, gaga parentheses, put mute word etceterasemantic errors go along when the form of the elements in a statement is better but the elements are not validatedated for its use. semantic errors are normally sight at compile time. semantic errors pass along during the movement of the code, after it has been parsed as grammatically correct. These errors set out to do not with how statements are constructed, but with what they mean. secureness examples of sematic errors are such things as anomalous versatile types or sizes, non-existent variants, subscripts out of range, specifying the wrong number of arguments for a function, using mathematical multivariate name where only if character variable is valid and non-existent references.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.