Sequence and Decisions Using Simple Conditions

Program Structure – Sequence and Decisions Using Simple Conditions

UNDERSTAND PROGRAM STRUCTURE BY READING THE FOLLOWING:

Webber (2010). Modern Programming Languages: A Practical Introduction (2nd e.d.). Wilsonville, OR: Franklin Beedle and Associates.

While you read, understand the following topics:

a)Structured vs. unstructured logic

b)Characteristics of structured program

c)The three basic structures (sequence, decision, and repetition)

d)The reasons for structure (clarity, professionalism, efficiency, maintenance and modularity)

Learn how to logically create a simple decision. Think about what you already know about Boolean logic.

A) UNDERSTAND RELATIONAL OPERATORS
B) UNDERSTAND BOOLEAN LOGIC
C) CREATE SIMPLE BOOLEAN CONDITIONS
1. REVIEW THE FOLLOWING DOCUMENT AS MUCH AS POSSIBLE – A FIRST LOOK AT JAVA – ([COMPARISON AND BOOLEAN OPERATORS], AND [IF AND WHILE STATEMENTS]).
AFTER READING, COMPARE WHAT YOU ALREADY KNEW ABOUT BOLEAN OPERATORS TO WHAT YOU LEARNED IN THE READING.

Learn how to structure a program using sequence and decision structure. While reading the Step 3 resources, examine the following topics:

a)Types of decision structures

b)Stack and nest sequence and decision structures to structure a program

c) Create a decision structure using simple decision and stacked structures.

Resources:

 RAPTOR official Website http://raptor.martincarlisle.com/

-To learn more about the logic of making decisions and program structures, in particular, program structures, watch the following videos:

Raptor Compute Change

Decision Structures in Raptor

Raptor Nested Decision Structure

TASK DIRECTIONS: TASK 5 DELIVERABLES BY WEEK 5 DEADLINE

WRITE A PROGRAM IN RAPTOR OR IN JAVA THAT SOLVES THE FOLLOWING PROBLEM: GIVEN INPUT OF THE DAY OF THE WEEK AND THE CURRENT WEATHER CONDITIONS (BAD OR GOOD), DISPLAY THE FORM OF TRANSPORTATION (CAR, BUS, OR BIKE) GIVEN BY THE FOLLOWING CHART:

Mode of Transportation
Mode Days Weather
Bus M/W N/A
Car T/F always on Bad days
Bike Thurs only on Good days