CS1101: Programming Methodology

Slides:



Advertisements
Similar presentations
CS1010 Programming Methodology
Advertisements

CS1010: Programming Methodology
CS1101: Programming Methodology
Discussion 3. Questions? Term test? Lectures? Labs?
Primitive Data Types and Operations. Introducing Programming with an Example public class ComputeArea { /** Main method */ public static void main(String[]
0 CS100J September 2007 CS100J: 12 weeks programming using Java, 2 using Matlab. David Gries. CS100M: 7 weeks of Matlab and 7 of Java. Daisy Fan. CS100H:
Lecture 11. Today’s topic Conditional statement –Relational operators –if statement –if-else statement –If-elseif statement.
1 Session-13 CSIT 121 Spring 2006 Test-1 is on March 9 th ; Demo-5 due date extended to March 7 Test-1 is on March 9 th ; Demo-5 due date extended to.
Lecture 8. Review (Methods of Math class) int abs( int num ) double sqrt( double num ) double pow( double num, double power ) Method parametersData type.
Software Engineering 1 (Chap. 1) Object-Centered Design.
Computer Programming Lab(4).
Week 2 - Friday.  What did we talk about last time?  Data representation  Binary numbers  Types  int  boolean  double  char  String.
1 CS1110 Fall 2011: David Gries & Steve Marschner CS1112: Matlab No prior programming experience One semester of calculus Math- & engineering- type problems.
CS1101: Programming Methodology Aaron Tan.
CS1101: Programming Methodology
CS1101: Programming Methodology Aaron Tan.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
1 Programming and Problem Solving — Software Engineering (Read Chap. 2)
Programming and Problem Solving — Software Engineering (Read Chap. 2) 1.
CS1101: Programming Methodology Aaron Tan.
CPS 2231 Computer Organization and Programming Instructor: Tian (Tina) Tian.
Physical Science Mr. Hoffman Mrs. Britz Room 241.
Please open Daily Quiz 34. A scientific calculator may be used on this quiz. You can keep your yellow formula sheets out when you take the quiz. Remember.
CS1101: Programming Methodology Aaron Tan.
CS1101: Programming Methodology
Floating Point Numbers Expressions Scanner Input Algorithms to Programs Shirley Moore CS 1401 Spring 2013 February 12, 2013.
CS100J Spring 2006 CS100J: 11 weeks of programming using Java and 2 weeks using Matlab. David Gries is teaching CS100J. Graeme Bailey is teaching a special.
Week 2 - Wednesday.  What did we talk about last time?  Data representation  Binary numbers  Types  int  boolean  double  char  String.
WEEK 4 Class Activities Lecturer’s slides.
CS 115 QUIZ # 1 INFORMATION Scheduled for TUESDAY 9/22/15 1.
Agenda Review C++ Library Functions Review User Input Making your own functions Exam #1 Next Week Reading: Chapter 3.
CS1101: Programming Methodology Aaron Tan.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 3: Numerical Data Manipulating Numbers Variables.
CS1101: Programming Methodology
MGS 351 Introduction to Management Information Systems RECITATION 8.
CS1101: Programming Methodology
CS1101: Programming Methodology Aaron Tan.
1 CS1100 Fall Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems CS100J:
CS1101: Programming Methodology Aaron Tan.
CS1101: Programming Methodology
Basics of Most C++ Programs // Programmer: Clayton Price date: 9/4/ // File: fahr2celc.cpp 03. // Purpose:
CS1101: Programming Methodology
WEEK 6 Class Activities Lecturer’s slides.
MGS 351 Introduction to Management Information Systems RECITATION 8.
CS1101X: Programming Methodology Recitation 4 Design Issues and Problem Solving.
CS 115 QUIZ # 2 INFORMATION 1. When TUESDAY 11/10 Worth: 8 points 2.
COIT29222 Structured Programming 1 COIT29222-Structured Programming Lecture Week 02  Reading: Textbook(4 th Ed.), Chapter 2 Textbook (6 th Ed.), Chapters.
CS1101: Programming Methodology
Celsius and Fahrenheit
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
Math 010 online work that was due today at the start of class: Section 1.3A Online Homework.
CS1101: Programming Methodology
Week 9 - Friday.  What did we talk about last time?  Static method practice  Finished the Game of Life.
CS1010: Programming Methodology
1 CS100J Spring Instructor: David Gries CS100M: Matlab No prior programming experience One semester of calculus Math & engineering type problems.
INSTRUCTIONS FOR WORK ON 8/27/15 EXERCISES 1. EXTRA CREDIT # 1 YOU MUST SHOW YOUR WORK TO ONE OF THE TEACHING ASSISTANTS IN CLASS WHEN DONE. THE TA WILL.
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
CS 115 Lecture 5 Math library; building a project Taken from notes by Dr. Neil Moore.
Fundamental Programming Fundamental Programming Data Processing and Expressions.
COM621 – Interactive Web Development 2015/2016 Module Co-Ordinator: Dr. Pratheepan Yogarajah Room:
CSE 1020:Using API Mark Shtern 1-1. Summary Delegation – Static Method, Object Client view vs Implementer view API, UML Errors Software Engineering Utility.
Week 3 - Monday.  What did we talk about last time?  Using Scanner to get input  Basic math operations  Lab 2.
CS1101: Programming Methodology Aaron Tan.
Foundations of Programming: Java
CSIS 1117A Computer Programming (C++)
CIS 407 STUDY Education for Service-- cis407study.com.
Pseudocode and Flowcharts
Suggestions for Preparation
CST-115 Introduction to Computer Programming
Seating “chart” Front Back 4 rows 5 rows 5 rows 4 rows 2 rows 2 rows
Presentation transcript:

CS1101: Programming Methodology

Week 3: Numerical Data and OOP Basics  Last week:  Chapter 1: Intro to OOP and S/W Development  Chapter 2: Getting Started with Java  DrJava  CourseMarker  This week:  Take-home lab #1  Chapter 3: Numerical Data  Chapter 4: Defining Your Own Classes – Part 1  Next week:  Chapter 4: Defining Your Own Classes – Part 1 (cont’d)  Chapter 5: Selection Statements © CS1101 (AY Semester 1)Week3 - 2

Reminder  Have you read the relevant chapters and PowerPoint files BEFORE coming to this lecture?  Have you been filling your Progress Chart? © CS1101 (AY Semester 1)Week3 - 3

Chapter 3 Numerical Data Any questions on Chapter 3? We’ll skip GregorianCalendar class. © CS1101 (AY Semester 1)Week3 - 4

What are the answers? (1/2) (int) = 30 % 7 = 30 / 7 = 30.0 / 7 = 30 / 7.0 = 30.0 / 7.0 = (double) 30 / 7 = 30 / (double) 7 = (double) (30 / 7) = © CS1101 (AY Semester 1)Week

What are the answers? (2/2) "Java" = "Java" = "Java" + ( ) = 1 + "Java" = "Java" + 3 = © CS1101 (AY Semester 1)Week

Temperature Conversion The following is the formula to convert temperature in degree Fahrenheit to Celsius:  C = (5/9) × (F – 32) Download “Ch3TemperatureConvert.java” and test it.  Why doesn’t it work?  Can you correct the program?  Note: This type of error is very common! © CS1101 (AY Semester 1)Week3 - 7

Loan Calculator Let’s study the development of this program. © CS1101 (AY Semester 1)Week3 - 8

Take-home lab assignment #1 It has been released. Deadline is next Monday, 31 August 2009, 23:59hr. Any questions? © CS1101 (AY Semester 1)Week3 - 9

Java API Documentation (1/2) A very important website  © CS1101 (AY Semester 1)Week Bookmark it!

Java API Documentation (2/2) It’s impossible to cover everything about a standard (built-in) class, so you need to look it up yourself. For example, in take-home lab #1, you need to look for these yourself: Exercise 1: What is the maximum integer value in Java? Exercise 3: What is the method in Scanner class to read the user’s input as a line of text? Exercise 4: What is the appropriate method in Math class to compute the hypothenuse? © CS1101 (AY Semester 1)Week3 - 11

Chapter 4 Defining Your Own Classes – Part 1 Let’s go to Chapter 4. © CS1101 (AY Semester 1)Week3 - 12

Summary for Today What are numerical data types? Performing computation on numerical data Some standard (built-in) classes  DecimalFormat  Scanner  Math  Random API documentation page How to define and use your own class (to be continued next week) © CS1101 (AY Semester 1)Week3 - 13

Announcements/Things-to-do Take-home lab #1 deadline: 31 August 2009, Monday, 23:59hr. To prepare for next week’s lecture:  Read Chapter 4 (again) and Chapter 5 and their PowerPoint files before you come for lecture.  Do Quick Check questions in Chapter 4. Check out the answers (on CS1101 website) yourself. To prepare for next week’s discussion session:  Download “week4_discussion_qns.pdf” from module website, “CA – Discussion”.  Do the questions before you attend your discussion session. © CS1101 (AY Semester 1)Week3 - 14

End of File © CS1101 (AY Semester 1)Week3 - 15