Friday, August 30, 2019

Junior Programmming ONLY

In-Class Activity: Simple Calculator






Instructions:  Create a Simple Calculator program in C++.  The calculator should have the ability to add, subtract, divide, or multiply two inputted values.  Use a menu-style format to allow the user to select the type of operation they would like to do.  The program only needs to run once.

Do necessary research to allow adequate time for you to complete the program within the next class period.  To be collected and graded on Day 1 Cycle 2

Junior 1 Homework

Class:  Information Technology
Date Administered: August 30, 2019
Date Due:  Next IT Class
Submission Format:  Hardcopy (printed)
To be graded.  10 points each

Instructions:  Write structured algorithms for the following problems:  (simple algorithms)

1.  The cost to go to Altun Ha are as follows:  $5.00 for Belizean and $10.00 for non-Belizeans.  Write an algorithm that calculates and shows the total for a group going to Altun Ha.

2. Write an algorithm that asks the user to enter the diameter of a circle.  The algorithm should calculate and show the circumference of a circle using the formula circumference = 2 Pi R

3. Write an algorithm that prompts the user to enter the name and age of three friends.  The algorithm should find and show the average age of the friends.

4.  Write an algorithm that asks the user to enter a number and store in X.  The algorithm should find and show the square and cube of the number.

Algo WHAT???

Algorithms... series of instructions that rigorously defines the solution to a problem.

Types of Algorithms:

  1. Simple
  2. Conditional 
  3. Loops
  4. Arrays
Formats in which algorithms are represented?
  • Narrative ~ written in plain English text.  Example:  Instructions on a recipe card.
  • Pseudocode ~ English-like text and code.  Example:  Read num (input a number)
  • Structured ~ Codes.  The only format that is executable.
  • Flowchart ~ graphical (or pictorial) representation of an algorithm.
When writing algorithms, there are some words that have special meanings.  These are known as reserved words.  Listed below are a few of the reserved words used in algorithms.
Print - display on screen.  Used in output statements
Input - enter via keyboard.  Used in input statements
Input key - press any key to continue.  Used to terminate an algorithm; called the terminator
name - a reserved word; cannot be used as a variable name
width - a reserved word; cannot be used as a variable name
add - a reserved word; cannot be used as a variable name
date - a reserved word; cannot be used as a variable name

Algorithms fall under the first phase in computer program development (Problem Solving Phase)
Steps in the problem solving phase:
  1. Define the problem
  2. Find a solution
  3. Evaluate alternate solutions
  4. Choose the most efficient solution and write an algorihtm
  5. Test the algorithm for correctness
TO define the problem, programmers use a tool called a Defining Diagram which is a three column table that separates a problem into input, processing, and output.  This is commonly referred to as an IPO table.  (Input/Processing/Output)  

Example:

I
P
O
Num1
Num2
1.      Read Num1, Num2
2.      Calculate Sum
3.      Print Sum
Sum
This is the defining diagram to deconstruct a problem that asks to calculate and output the sum of two numbers.

In the Input (I) section, anything that the user has to enter goes here
In the Processing (P) section, anything that the computer has to do goes here
In the Output (O) section, the solution values that will be displayed goes here

You try one: Prepare an IPO table to solve the problem:
A technician makes $90.00 per day and 1.5 times that value for overtime hours.  Write an algorithm that prompts the user to enter the amount of days and overtime hours worked by the technician, and calculate the week salary for the technician.  Your algorithm should display the total week salary with suitable labels.

After you've completed the IPO table, give it a try to write the algorithm.  It's a simple algorithm.  Submit your solution via email for bonus points on your lowest quiz grade.  Value - 2 bonus points




Juniors Quiz

Instructions:  Answer all questions clearly.

  1. There are two phases in computer program development.  What is the second phase?
  2. State the three types of errors that the compiler checks for in the debugging process.
  3. List the five steps in the first phase of computer program development.
  4. Define syntax.
  5. When a computer programmer writes a program, what is this code called?
  6. List the three formats in which an algorithm may be represented.
  7. What is an algorithm?
  8. A program is written asking the user to enter their name.  What datatype is expected?
  9. A program is written that shows the mean of five whole numbers.  What datatype is the mean?
  10. Briefly explain what a compiler is.

Thursday, August 29, 2019

Emerging Ethical Dilemmas in Science and Technology -Junior 2 ONLY

Robot swarms
Researchers at Harvard University created a swarm of over 1000 robots, capable of communicating with each other to perform simple tasks such as arranging themselves into shapes and patterns. These "kilobots" require no human intervention beyond the original set of instructions and work together to complete tasks. These tiny bots are based on the swarm behavior of insects and can be used to perform environmental cleanups or respond to disasters where humans fear to tread. The concept of driver-less cars also relies on this system, where the cars themselves (without human intervention, ideally) would communicate with each other to obey traffic laws and deliver people safely to their destinations. But should we be worried about the ethical and policy implications of letting robots work together without humans running interference? What happens if a bot malfunctions and causes harm? Who would be blamed for such an accident? What if tiny swarms of robots could be set up to spy or sabotage? 
Thoughts?????
Write a short essay reflecting on your thoughts to the highlighted questions.  (300 words maximum)  To be collected within the class session on Day 1 Cycle 2



Tuesday, August 20, 2019

Welcome Juniors

Welcome to my educational blog!  This forum will be used to share information about technology, the advancements in the field of computer science, and to allow access to on-line assessments.  Within this semester, we will use several forums to aide in our strive for academic excellence.

Let me know you visited by placing your name and class as a comment.  Easy way to earn your first "A" in my class.