420 likes | 434 Views
Why Computer Science?. “The United States currently has more than 494,000 unfilled computing jobs, but only 43,000 computer science graduates to fill those jobs,” Kentucky Education Commissioner Stephen Pruitt , 2017. Mr. Smith’s Schedule Fall 2018. 1 st Period Computer Science I (D131)
E N D
Why Computer Science? “The United States currently has more than 494,000 unfilled computing jobs, but only 43,000 computer science graduates to fill those jobs,” Kentucky Education Commissioner Stephen Pruitt , 2017
Mr. Smith’s Schedule Fall 2018 • 1st Period Computer Science I (D131) • 2nd Period Prep • 3rd Period Computer Science I (D131) • 4th Period Intro to Programming (D131) • Lunch • 5th Period AP Computer Science (A116) • 6th Period AP Computer Science (A116) • 7th Period Prep • 8th Period Robotics Projects/Advanced Computer Projects (A116)
West High D131 Main Gym Counselors A116 Commons Attendance Student Center
West High Main Gym Commons Counselors A116 D131 Attendance Student Center
Introductions • You will introduce the people next to you • Name • Strength • If you had $10,000 what would you spend it on? • Where would you like to live in the future?
Seating • Organize yourselves by Last Name
Computer Science IToday’s Schedule • Successful behaviors • Log In • Set up Folders/Shortcuts • Finding your strengths • Writing a program
Top Paid Majors for 2018 Here is a list of average starting salaries by discipline: National Center for Career Development
Successful Behavior • Behavior/Discipline Plan: • Students are expected to be safe, responsible and respectful. • Students not following these expectations may expect: verbal warnings, removal from class pending conference, parent contact, or referral to administration.
To be successful in this course: • Stay focused and productive in the classroom • Excellent attendance • Let your projects, daily work, quizzes and tests display your best effort • Feel free to talk with me about your projects, questions, etc.
Computer Lab Rules • No gum in class • No food or drink in the lab (except water with a lid at approved locations) • No headphones or music except on days selected by teacher • Absolutely no off-task Internet usage (e-mail, games, chat, etc – anything other than class related) • Absolutely no off-task Computer usage (ask teacher permission to use equipment for anything other than class assignments) • Do NOT download any software (games, utilities, music, etc.) • Do NOT use any “chat” software • No CELL PHONE use in class without permission of Mr. Smith.
Materials Needed • Each student will need a Composition Book, spiral or a tabbed off section in your three-ring binder for notes and handouts. • Bring notebook, and a pen or pencil with you everyday
Course Overview 1) Getting Started Students are introduced to Pascal, the process of writing, compiling and running code. Students will move from ‘Hello world’ to writing programs that get user input and perform simple calculations. 2) Math in In the second week of the course students use more complex mathematics in Pascal and gain more experience taking a problem and implementing its solution in Pascal. 3) Making decisions: if/else During this week students are introduced to decision constructs and add some logic to their programs. 4) Repeating pieces of code: for loop For loop, while loop and repeat until. 5) Case State: If else on steroids 6) Repeat Until 7) While Loop 8) Project 9) Procedures and functions 10) Arrays Saving Searching Sorting 11) If time.. Files Dynamic data structures
Grading • Class Activities • Warm-up Activities 5 pts • Programs 10 pts • Projects 20-100 pts • Quizzes 25 pts • Tests 100 pts • Grading Policy • A: 90-100% • B: 80 – 89% • C: 70 – 79% • D: 60 – 69% • F: 0 – 59%
Questions?? • School Announcements
Log in • Log onto the network • Your log in number is on your student ID number • Your password is your First Initial Last Initial Birthdate. • Example • Susie Kalahan 1/1/2002 • sk112002 • Jose Mahindra 10/15/2001 • Jm10152001 • Create a Folder for ComputerScience1 in your school folder
Creating Shortcuts 2) Double Click on ‘CS1’ Folder 1) Double Click on SMITH_GREG-Shortcut
Drag and Drop into your ComputerScience1 Folder. Drag and Drop Into Your Computer Science 1 Folder Drop
Shortcut to Class Website • www.smithcsrobot.weebly.com Find your course and click
Put Shortcut into Your Class Folder Drag and Drop Into Your Folder Drop
Class Website Print out the Syllabus at home Have your parents sign it and turn it in
Find the Class Website, Find your Strengths • Smithcsrobot.weebly.com • Click on the Computer Science 1 Link • Click on ‘Find Your Strengths’ • When complete Turn in a Word Document that includes: • Your Name • Class Period • Two + strengths • Any questions you have at this point in time • Anything that would help me teach you better.
Start a New Project (Folder) 1) Project Now Project… 2) ‘Choose’ Navigate to your ComputerScience1 Folder
Navigate to ComputerScience1 Select Folder
Name the Project 1) Name The Project. No Spaces 2) Click OK
Start with a capital letter. Start a new ‘Class’ 1) New Class
Double Click on the Class to edit Double Click
Fill in the Class Enter your name, brief description of the program, the date and version 1.0. Delete info between the {} after the public class Welcome1
First Program Enter the following program in BlueJ. Put in your name after @author
Compiling the Program After you get it compiled correctly. Make an error and note the hint from the compiler. Record three of the errors and hints on the worksheet. Click Compile Check for errors.
Running the Program Right click on the class. Select void main() Click OK
Turn in the .java file Rename the java file to YourNameWelcome1 and turn in to the turn in folder. Include your name in the file name
Breaking Down the Program • /** */ Header comments • Include your name • A short description of the program • The Date • // One-line comments. Java does not try to execute these commands. • /* */ Multiple line comments
public class Welcome1 • Marks the beginning of this program (class) • Case sensitive Public Class Welcome1 is different • { } • Mark the beginning and end of this class
public static void main(String args[]) • This is the starting point of every java application • (Main body of the program) • () after main indicate it is a method. • Java classes usually contain more than one method • Exactly one of these methods must be called main and defined as above for the program to run. • Methods perform tasks and return information. Kind of like functions • void indicates that it will return nothing. • String args[] is required for the main's definition. More details later.
{ • Marks the beginning of the main body of the class. • Needs to match up with a } • Indent between the {}
System.out.println("Welcome to Java programming!"); • System.out is the standard output object for showing info in the command window • The stuff inside () are the arguments • System.out.println(); Displays the arguments (Stuff in parenthesis) and returns to the next line • "Wel..." This is a String of characters that will show up on the screen, message or string literal.
Review Describe the following // Mr. Smith // First Program // Today’s date public class Welcome1 { public static void main(String [] args) { //The start of the method System.out.println(“Join a club at West!"); } } What is… The name of the class. What will it show in the screen.
More on System.out public class Welcome1 { //main method begins execution of Java application public static void main(String [] args) { //The start of the method System.out.print("Welcome to "); //Stays on the same line System.out.println(“Java programming”); }//End of method main } //End of class Welcome1
Showing Multiple lines public class Welcome1 { //main method begins execution of Java application public static void main(String [] args) { //The start of the method System.out.println(“Welcome \nto \nJava \nprogramming”); }//End of method main } //End of class Welcome1
Your first programs • Poem/Song: (YourNamePoem-Song) • Create or modify a poem or song to display from your Java Program. • You will need to incorporate at least one printf. • Check: Using printf (YourNameCheck) • No input • Display information on the screen for a check with your generous donation to the West Salem Robotics Club. • You will need to incorporate at least one printf. • ASCII Art • Using print, printf and println create a simple ASCII art image.