Docsity

Introduction to Java Programming - Introduction to Programming II | CS 112, Study notes of Computer Science

Toggle sidebar
bg1
Intro to Programming II
Introduction
Chris Brooks
Department of Computer Science
University of San Francisco
Departmentof Computer Science —University of San Francisco – p.1/??
1-2: Syllabus
•Office Hours
•Course Text
•Prerequisites
•Grading Policies
Departmentof Computer Science —University of San Francisco – p.2/??
1-3: Topics
•This class is designed to give you more familiarity and skill in
Java Programming.
◦OO design
◦Basic Software Engineering skills
◦Abstraction
◦Practice, practice, practice!
•You’ll also get an introduction to programming in C.
Departmentof Computer Science —University of San Francisco – p.3/??
1-4: Grading
•You’ll have a series of lab assignments to do
◦Done in-class
◦Satisfactory/unsatisfactory grade
•You’ll also have four programming projects
◦Larger; 2 weeks apiece
•Plus two midterms and a final
◦In class, closed notes
•I believe that the best way to learn a topic like programming is
to do it.
Departmentof Computer Science —University of San Francisco – p.4/??
1-5: How to Succeed
•Come to class. Pay attention. Ask questions.
Departmentof Computer Science —University of San Francisco – p.5/??
1-6: How to Succeed
•Come to class. Pay attention. Ask questions.
◦A question as vague as “I don’t get it” is perfectly
acceptable.
◦If you’re confused, at least half the class is also.
◦Don’t wait until after class to ask!
Departmentof Computer Science —University of San Francisco – p.6/??
pf3

Partial preview of the text

Download Introduction to Java Programming - Introduction to Programming II | CS 112 and more Study notes Computer Science in PDF only on Docsity!

Intro to Programming II

Introduction

Chris Brooks Department of Computer Science University of San Francisco ?? Department of Computer Science — University of San Francisco – p.1/ Syllabus 1-2: Office Hours • Course Text • Prerequisites • Grading Policies • ?? Department of Computer Science — University of San Francisco – p.2/ Topics 1-3: This class is designed to give you more familiarity and skill in • Java Programming. OO design ◦ Basic Software Engineering skills ◦ Abstraction ◦ Practice, practice, practice! ◦ You’ll also get an introduction to programming in C. • ?? Department of Computer Science — University of San Francisco – p.3/ Grading 1-4: to do lab assignments You’ll have a series of • Done in-class ◦ Satisfactory/unsatisfactory grade ◦ You’ll also have four programming projects • Larger; 2 weeks apiece ◦ Plus two midterms and a final • In class, closed notes ◦ I believe that the best way to learn a topic like programming is • it. do to ?? Department of Computer Science — University of San Francisco – p.4/ How to Succeed 1-5: Come to class. Pay attention. Ask questions. • How to Succeed 1-6: Come to class. Pay attention. Ask questions. • A question as vague as “I don’t get it” is perfectly ◦ acceptable. half the class is also. at least If you’re confused, ◦ Don’t wait until after class to ask! ◦

How to Succeed 1-7: Come to class. Pay attention. Ask questions. • A question as vague as “I don’t get it” is perfectly ◦ acceptable. half the class is also. at least If you’re confused, ◦ Don’t wait until after class to ask! ◦ Come by my office • available to students. very I am ◦ ?? Department of Computer Science — University of San Francisco – p.7/ How to Succeed 1-8: Come to class. Pay attention. Ask questions. • A question as vague as “I don’t get it” is perfectly ◦ acceptable. half the class is also. at least If you’re confused, ◦ Don’t wait until after class to ask! ◦ Come by my office • available to students. very I am ◦ Start the homework assignments and projects early • Waiting until the last minute to start projects is a bad idea. ◦ ?? Department of Computer Science — University of San Francisco – p.8/ How to Succeed 1-9: Come to class. Pay attention. Ask questions. • A question as vague as “I don’t get it” is perfectly ◦ acceptable. half the class is also. at least If you’re confused, ◦ Don’t wait until after class to ask! ◦ Come by my office • available to students. very I am ◦ Start the homework assignments and projects early • Waiting until the last minute to start projects is a bad idea. ◦ Read the textbook. • Ask Questions! Come to Class! ◦ ?? Department of Computer Science — University of San Francisco – p.9/ Words of Wisdom 1-10: “90% of life is showing up.” – Woody Allen • “Just keep swimming.” – Finding Nemo • “Never mistake activity for achievement.” – John Wooden • “Teachers open the door. You must step through on your own.” •

  • Chinese Proverb. ?? Department of Computer Science — University of San Francisco – p.10/ Words of Wisdom 1-11: “90% of life is showing up.” – Woody Allen • “Just keep swimming.” – Finding Nemo • “Never mistake activity for achievement.” – John Wooden • “Teachers open the door. You must step through on your own.” •
  • Chinese Proverb. “Do I contradict myself? Very well, then. I contradict myself. I • am large; I contain multitudes.” - Walt Whitman Lab 1: Java Practice 1-12: Write a program that converts from Fahrenheit to Celsius. It • should prompt the user for a temperature, and then ask whether the input is in Fahrenheit or Celsius. It should then calculate the temperature for the other scale. The relevant formulae are:

+ 32 C ∗^95 = F ◦

32) − F(^59 = C ◦

You should have a main method that prompts the user for a • temperature and asks whether it’s Fahrenheit or Celsius You should have static methods called FtoC and CtoF. •