Discussion-about-Programming-Construct-computer-science-homework-help

Discussion-about-Programming-Construct-computer-science-homework-help

Discussion:

(I will post a student’s example for this assignment )

There are 3 basic programming constructs we use. Let’s look at the process of withdrawing money from a bank account by way of an ATM machine. What are the steps we might use?

Step 1: Slide debit card

Step 2: Enter PIN

Step 3: Ask how much to withdraw

Step 4: Make a choice from the account

If savings account and if enough money, money is withdrawn from savings

If checking account and if enough money, money is withdrawn from checking

Step 5: Money is given.

Step 6: Receipt is given.

Step 7: Do you want to perform another transaction

if yes, go back to Step 3,

if no, stop.

This may not be exactly like your ATM, but it’s not a far stretch. However, from this example, we can see the need for the 3 basic programming constructs.

They are:

1: Sequence

2: Selection

3: Iteration

Let’s detail each of these:

1: Sequence. This is something like a recipe. You follow instructions, step by step, in order, one at a time, to achieve some goal. You will most always have this in programming. In the ATM example, Steps 1, 2, and 3 are examples of sequence.

2: Selection. Sometimes we are required to make a choice, such as Step 4 above. We will either select one path OR another path based upon some condition or question that we ask.

3: Iteration. Repetition is its synonym. Often, we need to repeat code, so based upon some condition or question, we will do some set of instructions again. In coding, we call this a loop.

Student’s example:

One main example I found regarding sequence is a payroll. For example:

1. Do payroll

2. Enter pay details (employee name, rate of pay, hours worked)

3. Calculate pay

4. Document/print pay details

5. Update employee record

So, every time a business does a payroll it’s always going to be done using the same method.

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational