Sunday, January 26, 2020

Principles Of Procedural Programming Computer Science Essay

Principles Of Procedural Programming Computer Science Essay Procedural programming is the most natural way of telling a computer what to do as the computer processors own language and machine code is procedural. It is also referred as structured or modular programming. Procedural programming is performed by telling the computer what to do and how to do it through a list of step-by-step instructions. Therefore, procedural programming involves procedures, which implies that there are steps that need to be followed to complete a specific task. For example read a number, add 7 or display a specific message. Procedural programming is quite straightforward and efficient as more than often to begin with, the program is written in a common and plain language by applying logic before actually writing the code. The main features of procedural programming is that it is relatively easy to read and write program code and maintain program code as numerous procedures can be debugged separately. Furthermore, large programs are divided into smaller ones and that most of the data is shared and can therefore be reached from any other point within the program. Conclusively, taking into account that the main characteristics of procedural programing being sequential logic, simplicity, easy implementation of compilers and interpreters, ability to make use of the same code in the program by calling it instead of copying, ease with which the program flow can be tracked, ability to be strongly modular or structured, it can definitely be said that procedural programming is an essential stepping stone towards learning further programming skills. 2. Implementing Procedural Programming Solutions. An algorithm can be defined as a set of steps for performing a task that can be written down and implemented. An algorithm details how to start with known information specified in the problem and how to use that information to reach a solution. In this particular task, the following algorithm using pseudo code has been developed a program which will help a small High Street Curry House manage their business operations. Algorithm using pseudo code Show Login and Exit ( Press 1 to Login/ else exit) Request monthly salary and other income Calculate and Display Total Income Request All Personal Expenses ( i.e. college fees/ rent/ food/travel/entertainment/phone bill/ gas bill/electricity bill/ TV license/ council tax/ club membership and charity contribution and any other expenses) Calculate all expenses and display Total Expenses Calculate and Display Balance (Total Income Total Expenses) If Balance is positive display credit amount and if negative display no more funds available. Diagram 1| Flowchart illustrating Algorithms Logical Flow Functions. START IF 1 OR IF 2 Salary + Other Income = Total Income Display Request Salary Other income Login Request all Expenses Calculate Total Expenses Display Total Income Total Expenses = Balance If Balance is +ve (Balance > 0) If Balance is -ve (Balance Display You are in Credit EXIT No More Funds Available 3| Implement Procedural Programming Solution using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Unit18_CW_ID10571 { class Program { static void Main(string[] args) { double monthlySalary, otherIncome, totalIncome,balance; /************************************************************************************************************************************* About : This program answers Task 3 of the Coursework for Unit18_Procedural Programming, BTEC HND in Computing and Systems Development (CSD). Icon College of Technology and Management. Date : 10.04.2013 By : Ibrahim Khan Mahomudally . Student ID : 10571 Tutor : Y M Gebremichael *************************************************************************************************************************************/ Console.WriteLine( ****************************************************************************** n); Console.WriteLine( ~~~~~~~~~~~~~~~~~ Profit Loss Accounting 2013 ~~~~~~~~~~~~~~~~~~~~ ); Console.WriteLine(tttt [Menu]nn); Console.WriteLine(tttt 1. Loginnn); Console.WriteLine(tttt 2. Exitnn); Console.WriteLine(ttt To Login Please Press 1nn); Console.WriteLine(ttt To Exit Please Press 2nn); Console.WriteLine( ****************************************************************************** ); int Menu = int.Parse(Console.ReadLine()); if (Menu == 1) { // input income //calculate total income and display Console.WriteLine(************************* All income***************************************); Console.WriteLine(Enter Monthly Salary: ); monthlySalary = double.Parse(Console.ReadLine()); Console.WriteLine(Enter Any Other Income); otherIncome = double.Parse(Console.ReadLine()); totalIncome = monthlySalary + otherIncome; Console.WriteLine(Total Income = + monthlySalary + + + otherIncome + = + totalIncome); /******************************************************************************/ //input expenses //calculate total expenses and display Console.WriteLine(************************* All Expenses***************************************); double totalExpenses, rent, collegeFees, food, travel, entertainment, phonebill, gasbill, electricitybill, tvlicense, counciltax, clubmembership, charitycontribution, anyotherexpenses; Console.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); travel = double.Parse(Console.ReadLine()); Console.WriteLine(Enter Entertainment); entertainment = double.Parse(Console.ReadLine()); Console.WriteLine(Enter Phone Bill); phonebill = double.Parse(Console.ReadLine()); Console.WriteLine(Enter Gas 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.WriteLine(Enter Council Tax); counciltax = double.Parse(Console.ReadLine()); Console.WriteLine(Enter Club Membership); clubmembership = double.Parse(Console.ReadLine()); Console.WriteLine(Enter Charity Contribution); charitycontribution = double.Parse(Console.ReadLine()); Console.WriteLine(Enter Any Other Expenses); anyotherexpenses = double.Parse(Console.ReadLine()); totalExpenses = collegeFees + rent + food + travel + entertainment + phonebill + gasbill + electricitybill + tvlicense + counciltax + clubmembership + charitycontribution + anyotherexpenses; Console.WriteLine(Total Expenses = + totalExpenses); Console.WriteLine(************************* Balance***************************************); //work out balance and display relevant message balance = totalIncome totalExpenses; Console.WriteLine(Balance = + balance); if (balance >= 0) { Console.WriteLine( 🙂 You Are In Credit by  £ + balance); } else { Console.WriteLine(:( No More Funds Available); } } else if (Menu == 2) { Environment.Exit(1); } else { Console.WriteLine(Enter a number from the menu); // this should return back to the menu again } Console.ReadLine() } } } 4| Testing Procedural Programming Solutions. Below are enclosed screenshots of the above-designed program demonstrating that every aspects of program is tested and compared against the design specification. Screenshot 1| Menu Options. Main menu presenting the user with the following options: Press 1 to Login Press 2 to Exit Screenshot 2| Request for Income. When 1 is pressed, User is requested to start entering figures for incomes Screenshot 3| Total Income. When all incomes are entered, Total Income is calculated and displayed. Screenshot 4| Input Expenses. User is requested to input figures for all expenses. Screenshot 5| Total Expenses, Positive Balance and Message. Total Expenses is calculated and displayed. Balance is obtained and if the result is positive, You Are In Credit message displayed. Screenshot 6| Negative Balance Relevant Message. Total Expenses is calculated and displayed. Balance is obtained and if result is negative, No More Funds Available message displayed 4b| Difference between syntax error and semantic error Syntax is the required grammar and punctuation of the language while semantics is all about meaning, that is, what the statements do, what the programs do. Applying the correct syntax is essential as if not done properly, the program wont run. The syntax of a language greatly affects how easy it is to write, read and understand programs. Syntax errors usually occur when program statements do not conform to the rule of the language. Therefore, Syntax errors occur during the parsing of input code, and are the result of grammatically incorrect statements. Some examples of syntax errors are misspelled keywords, unmatched quotation marks, missing semicolon, illegal character in the input, missing operator, two operators in a row, two statements on the same line with no intervening semicolon, unbalanced parentheses, misplaced reserved word etc. Semantic errors occur when the form of the elements in a statement is correct but the elements are not valid for its use. Semantic errors are normally detected at compile time. Semantic errors occur during the execution of the code, after it has been parsed as grammatically correct. These errors have to do not with how statements are constructed, but with what they mean. Regular examples of sematic errors are such things as incorrect variable types or sizes, non-existent variables, subscripts out of range, specifying the wrong number of arguments for a function, using numeric variable name where only character variable is valid and non-existent references.

Saturday, January 18, 2020

Leadership in a time of complexity

Introduction A true and effective leader reacts to critical incidents especially in times of stress  and challenge. He sets an example and is clear about the â€Å"rules of the road† and then adheres to them along the journey. Clarity, consensus and intensity are three essential factors for aligning values of leaders with those of the followers. The importance of shared values is that they channel and focus people’s energies and commitments. Leadership during a Crisis Leadership in critical times was clearly seen in the Hurricane Katrina which hit the Gulf Coast. The U.S. government agencies tasked with relief and rehabilitation operations seem to remain in limbo.   One of which is Federal Emergency Management Agency (FEMA), which reportedly delivered a mere 15 percent of the travel trailers and mobile homes that it hurriedly purchased for temporary housing. The Chicago Tribune reported that FEMA ordered 125,000 travel trailers or mobile homes after Katrina struck in order to provide housing for the estimated 600,000 people who have been displaced by that storm and Hurricane Rita, which hit eastern Texas and western Louisiana three weeks later. However, FEMA was only able to install 18,834 travel trailers in Louisiana and Mississippi and 494 more mobile homes in the two states.[1] Repercussions of the Hurricane There were also reports that a year before Hurricane Katrina hit the Gulf Coast, information technology utilized by the Homeland Security Department to support disaster management was so disconnected and inadequate that it was necessary for employees to develop ad hoc alternatives to supplement them. This was revealed by DHS' inspector general in a derisive report. Conclusion Thus, to point our fingers to a single cause or leadership may be overly simplistic.   The slow and inefficient disaster response may properly be viewed as the effect of various factors, including, but not exclusively, the inadequacies of the FEMA officials.[2]   All these spread far and wide, up to the very top of the government and down to the local government officials. It is sad that there was no strong leadership to have prevented this disaster. In sum, we conclude that leaders do not achieve success by themselves. Exemplary leaders enlist the support and assistance of all those who must make the project work. They involve, in some way, those who must live with the results, and they make it possible for others to do good work. BIBLIOGRAPHY Martin, A. Hitches Show in FEMA Trailer Plan. The Chicago Tribune. Retrieved May 19. 2007 at: Memo: FEMA had problems before Katrina. USA Today. Retrieved May 19. 2007 at: http://www.usatoday.com/news/washington/executive/2005-10-17-fema-memos_x.htm ; ; ; ; ; ; ; ; ; ; ; [1] Martin, A. Hitches Show in FEMA Trailer Plan. The Chicago Tribune. Retrieved May 19. 2007 at: http://www.chicagotribune.com/news/nationworld/chi-0511060220nov06,1,4411564.story?coll=chi-newsnationworld-hed [2] Memo: FEMA had problems before Katrina. USA Today. Retrieved May 19. 2007 at: http://www.usatoday.com/news/washington/executive/2005-10-17-fema-memos_x.htm ; ;

Friday, January 10, 2020

Favourite Hoiliday Essay

The word Diwali is an incorrect form of the word Dipawali, which means Rows Of Light. People will celebrate this festival during Karthik (October- November). All Indians will celebrate this festival but different religious people have various opinions about it. The Hindhus celebrates this festival as a gesture of their joy because when Sri Ramachandra return to Ayodhya after 14 years exile in the forest following his victory over evil demon Ravana in a war and signifies the victory of good over evil. This is a day for which every child waits through out the year. Though it’s a festival for all people it is very interesting to young people because they savor most on this day. On this occasion everyone will like to wear traditional dresses. On this day my house is completely decorated with flowers ,candle lights and elecronic bulbs so it looks like a heaven twinkling with sparkling lights. I initiate shopping around 1 month before the festival, because it is not only a festival for us it’s a day where all of our cousins compete to look pretty, so it resembles the fashion show. Everyone will peer like angels dropped from heaven, I think two eyes are not enough see the beauty of them. On this ceremony my mother will prepare delicious food, the menu itself is really mouth watering. My favourite dessert is double ka meeta it’s very rich and delicious. The ingrediants added in this are bread, milk, sugar, butter, almonds and cashews. One of the only thing I miss about Hyderabad apart from people is food especially this dessert nothing beats this taste. when I eat this dessert it definitely comes into my dream because its taste is that superb. The thing that which sounds very interesting and elite part of this festival is bursting of crackers. There are plenty kind of crackers, but I like rocket and Vishnu-bar most. I am really excited while bursting rocket because it directly goes upwards with vivid colors and zooyi sound. It’s really a beautiful scene when all the crackers bursted and emits bright colours with variety sounds. In the night time the whole city looks like a stars in the sky. All in all, I go to bed with all these memorable moments in my mind. It brings a wonderful feeling into the heart and souls of every man, woman and  child. Everyone must celebrate the festival and savor the fresh feeling in it. New clothes, dishes, sweets, fun and crackers all these are part of this festival.

Thursday, January 2, 2020

What Does You Know About Something Or Someone Missing Essay

Have you ever felt like there is something or someone missing in your life? Like there was something attached to you before and now it’s gone. You feel this emotion of longing and desiring for something or someone. Craving for their presence. Wishing and hoping it was there, or at least you were. Something that makes you ponder a lot. Making you stay up late and just replaying all the memories in your head. Or even, that nostalgia feeling whenever you go to a memorable place. Something that you could never let go off no matter how far you are or what you have become. You are feeling somewhat empty. Possibly regretful, sometimes. But, mostly the feeling of missing someone or something. The fact their constant presence made you very comfortable and suddenly it’s gone. It makes you think about how things have changed. Sometimes a drop of tear would come out of nowhere, or a sad smile will formed. Knowing that they are not physically and/or emotionally with you anymore. Th is emotion is well-known in Portugal as saudade. Saudade is defined as the yearning, longing, and desire triggered by separation and absence. This term is not found in the English dictionary, but it is translated as longing, yearning (for someone), fond remembrance, or homesickness, nostalgia. However, a few countries, such as Brazil, also practice this term to describe the same emotion in music, movies, stories, and emotional ways. In the thirteenth century, the word, soidade, is found in a song calledShow MoreRelatedImportance of Accountability1488 Words   |  6 PagesNo matter what you do in life whether it is being a teacher, cop, secretary, forensic scientist, or in my case, Marine, you will always find one thing in common. Within all of these jobs you will find that accountability is very important. You will also find that within keeping accountability you will not succeed. Accountability is knowing the amount of items or people in which you are responsible for. Accountabili ty is also knowing where the items and people are at all times. While knowing whereRead MoreThe Forty Developmental Assets in The Pigman by Paul Zindel Essay example623 Words   |  3 PagesSelf- esteem is only one of the Forty Developmental Assets. What are the Forty Developmental Assets? They are a set of building blocks that helps teenagers and people build up a healthy life. All good friends should have the Developmental Assets. In the novel, The Pigman by Paul Zindel, Lorraine Jensen demonstrates being caring, but she is missing self-esteem and positive peer influence. First, the character of Lorraine Jensen is missing a very important asset which is number thirty-eight, Self-esteemRead MoreMy Ideas About the Characters in The Boy in the Striped Pajamas1048 Words   |  5 Pagesways to learn something and really doesnt let anything get in his way and how he is worthy praise. An example would be when Shmuel said that his father was missing and Bruno offered to help him found shmuel dad but ended up dying. I like Bruno because of that reason. My second idea of the main characters would be that Gretel is the person that makes fun of Bruno because hes younger than her.Yet tho I kinda think that she is both worthy of praise and criticism because she does good things likeRead MoreThe Rise Of Fomo1233 Words   |  5 Pagesof FoMO What I Know and What I Want to Find Out The fear of missing out was always something that had peaked my curiosity. In my past, I often found myself in situations where I didn’t feel part of friends’ plans and it affected me on a deep level. I would constantly find myself obsessing over being involved in events. Not because I actually wanted to attend, but because I didn’t want to miss out. I didn’t know if this was an actual â€Å"thing,† so I never really thought anything of it. About 2 weeksRead MoreGear accountability1622 Words   |  7 Pageslose a piece of gear I must fill out a missing gear statement, get it signed off by my section head, the platoon sergeant, and my platoon officer. I always have to make sure that all my gear is clean before any kind of field op. I have miss placed gear before in the past because I didn’t keep track of it. Every day a marine loses a piece of gear, whether it is from a field op, moving barracks rooms, or when I am getting ready to go on ann ual leave. When you first check into any unit, whether itsRead MoreThe Era of Busyness and How We Can Overcome It875 Words   |  4 PagesI’m sure you have either said it to someone, or someone has said it to you (maybe even a few times). What am I talking about you may ask? That tiny little four-letter word we use to describe our plate being too full, our never-ending to-do list, or the act of juggling multiple tasks at once – I’m talking about being â€Å"busy†. For most of us, being busy is a way of life. Outside of working full-time, we fill our time with family, friends, hobbies, and of course, sleeping (hey, it’s what we do). Read MoreIndividual Research Process and Terminology Paper956 Words   |  4 PagesRaven Jones John Dosdall July 17, 2012 New Terminology in Criminal Justice We use research methods in our every day life and not even know it. Research methods play a very important part in the life of someone who is in the criminology field. Without some of the research methods that we have, many cases would never get solved, and they would be in the cold case files. In this paper, I will discuss new terminology and how it helps one who is in the criminology fieldRead MoreThe Pros And Cons Of Phones1237 Words   |  5 Pagescaller â€Å"Hello this is Ava Thomas I’m the LA’s deputy cop I’ve notice that you have a loan of $20,000 if you don’t pay it soon we will have to take you to court. Could you please contact me back as soon as possible.† When did I get a loan of $20,000? I look on my credit report to see what I’ve bought lately. There’s nothing, but where and what time someone got a loan on my credit card. â€Å"Mom I have to tell you something.† Mom walk in the kitchen and ask me â€Å"what’s the matter?† My mom askedRead MoreChild Abduction: Missing Without a Trace1795 Words   |  7 PagesChild Abduction: Missing without a Trace Today, we are all here gathered for Eli Davis, a charming, charismatic little boy with a smile that would brighten anyone’s day. His laugh was loud, but loved many, his eyes were big and bright, but we cannot say the same about his future because he never got the chance. No one saw it coming, but it came, and if we could turn back the hands of time to work in Elis favor it would be handled with the snap of a finger. If only we were more caring, careful,Read MoreThe Genetic Disorder of Down Syndrome1238 Words   |  5 Pages Who will grow up with not knowing if today will be a good day or not. Down Syndrome is just one case of genetic disorder. There are so many all over in the world and many doctors still don’t even know what to call them. Some don’t even know they have a disease in them till its too late, or other know all there lives and some learn to live with the disease and others live every day in fear of getting even more sick and hurt. Genetic disorders are very common some more than others. Its all has to