Wednesday, October 31, 2012

Happy Halloween

Stay safe!

Monday, October 29, 2012

Should I stay or should I go now?

Evacuations, flooded areas, and closing information can be found on the NJ.com web site, listed county by county. Evacuation routes are listed county by county on the New Jersey Office of Emergency Management site.

Should you find yourself in need of emergency shelter, please note the following announcement on the Monmouth County Emergency Management Hurricane Information page:

Sunday, October 28, 2012

Monitoring interval #4

The fourth monitoring interval for the fall 15-week term ends Wednesday, October 31st. The registrar's office will be printing and mailing alert letters later in the week. Students who are irregular in attendance, stopped coming to class altogether, fail assignments, and/or neglect to submit assignments will be reported as such and notified that they are in danger of failing this course.

Saturday, October 27, 2012

Hurricane Sandy

An alert was sent out at 11:16 this morning indicating that Governor Christie has declared a state of emergency for all of New Jersey because of the pending arrival of Hurricane Sandy. To help ensure the safety of all students and employees, all Brookdale locations will be CLOSED on Monday, October 29th and on Tuesday, October 30th. Members of the Brookdale community are directed to check the college website for updates.

Friday, October 26, 2012

FYE - Entrepeneurial Information Session

This is the fourth year that the Business and Technology Division and the New Jersey Small Business Development Center at BCC will offer an Entrepreneurial Information Session. This year it is designated as a First Year Experience (FYE) activity.

Monday, October 22, 2012

Theft advisory

Please be advised that over the past several weeks, five incidents of theft have been reported in the Bankier Library. A variety of Apple products have been stolen from students who have momentarily left their items unattended.

Saturday, October 20, 2012

Free software

A list of free software. No endorsements. No guarantees. No warranties.

Download and use at your own risk.

Use of DATE$

One of the requirements for your output in this class is to include the date after your name in the output window. The question is, which date? Do you want the date you wrote the code, the due date for the project, or another date?

If you wanted to display the date you wrote the code (or the due date), you could do it like so

Be square

During Thursday's class, we covered how to request and use the user's input to terminate a loop. The loop is terminated by what is known as a sentinel value. When the user enters the sentinel value, the program terminates loop execution.

Here is the source code we worked on during Thursday's class which we used to square numbers.

Use of post-test loops

In addition to the pre-test loops, QBASIC has post-test loops. The post-test loops look very similar to their pre-test cousins.

This is the syntax for DO...LOOP WHILE

DO
     ' BASIC code statements here
LOOP WHILE c

where

Use of pre-test loops

As discussed in class Thursday, in QBASIC, you have the option of writing pre-test or post-test loops. A pre-test loop is one in which the condition to stop the repetition is checked before the body of the loop is executed, therefore, the minimum number of iterations is zero. A post-test loop is one in which the loop termination condition is tested after the first execution of the loop's body; the minimum number of iterations is one.

Let's look at some source code for pre-test loops.

Thursday, October 18, 2012

Lab assignment #4 - temp2.bas

Problem Description
Allow the user to enter a sequence of temperature in degrees Celsius (C) terminated by -999. For each one, find the corresponding temperature in degrees Fahrenheit (F). Use the same formula as in lab assignment #2.

Lab assignment #3 - gpay.bas

Problem Description
The owners of the Super Supermarket want to compute the gross weekly pay of their employees. Each employee name, ID number, hours worked, overtime hours worked, and pay rate per hour (overtime will be figured as time-and-a-half) are to be input. The problem should output these values and the corresponding gross pay.

New Jersey Coastal Communiversity

Brookdale Community College is one of the six colleges and universities belonging to the New Jersey Coastal Communiversity. Students may complete two years of course work to earn an associates degree and transfer their credits towards specific bachelor degrees offered through the Communiversity. The four year institutions offer the third and fourth year course requirements and the bachelor decree is conferred by the partner school.

Monday, October 15, 2012

Monitoring interval #3 - reminder

An alarming number of students (one third of you!) are behind in their homework and lab assignment submissions. Doing your homework and turning in your labs on time is very important as the work assigned is reflective of the material covered in class.

Sunday, October 14, 2012

Monitoring interval #3

The third monitoring interval for the fall 15-week term ends Wednesday, October 17th. The registrar's office will be printing and mailing alert letters later in the week. Students who are irregular in attendance, stopped coming to class altogether, fail assignments, and/or neglect to submit assignments will be reported as such and notified that they are in danger of failing this course.

Friday, October 12, 2012

Use of PRINT and the semicolon

Sometimes when you are sending output to the monitor, you want the cursor to stay on the same line. To make that happen, you still use the PRINT command but you make sure to end the line with a semicolon.

Use of RND

Generating random numbers is something we frequently call upon computers to do. You can simulate the result of flipping a coin, rolling dice, or selecting lottery numbers. To do so in BASIC, we use the RND function.

The syntax is

Use of DO...LOOPs

In most programming languages, there are multiple ways to accomplish the same task and QBASIC is no exception. Last post, I revisited the syntax of the FOR...NEXT loop and showed how you could program model of a countdown timer. Here is another way to achieve the same results.

Use of FOR...NEXT

One way to execute a repetition of statements in BASIC is to use a FOR...NEXT loop.

The correct syntax is

FOR lcv = sv TO ev STEP incr
     ' BASIC code statements here
NEXT lcv

where

Thursday, October 11, 2012

Homework 3 - loopAvg.bas

Write a program called loopAvg.bas. Your program must sum the numbers from 17 to 37 inclusive, count how many addition steps that is, and then provide an average (the sum divided by the number of steps.

Wednesday, October 10, 2012

Priority registration

Notice to all students:

Priority registration for the Winterim session and the Spring term begins on November 1st and runs until November 17th! In order to give yourself the best chance of getting all of the classes you need as well as the days and class meeting times you prefer, you should register early.

You should receive your priority pass by Friday, October 12th and tuition for Spring classes is not due until January 8th.

Tuesday, October 9, 2012

I can has A?

Leading zeros

It is customary when programming to employ leading zeros when the number in question is between -1 and +1. By using a leading zero, you make the value abundantly clear. Here are some examples...

Use of PRINT USING

In order to limit output to a specified number of digits, you use the PRINT USING command.

Consider for a moment dividing 17 by 13. The result is 1.307692307692308. Do you really need *all* of those digits to the right of the decimal place? Most likely, unless you are doing extremely precise scientific

Wednesday, October 3, 2012

Code review forecast

I have noticed that a number of students seem to be making the same errors on the body mass index program and the temperature conversion program. In order to make a calculation using a user's input, you must first obtain the input. The sequence of your code statement matters.

Monday, October 1, 2012

Columbus Day

Notice to all students:

Brookdale is NOT closed on Columbus Day.
If you have MONDAY classes this term, you have class on Monday, October 8th.