CS 240 – Computer Programming I Lab

Slides:



Advertisements
Similar presentations
Complete Structure class Date {class Date { private :private : // private data and functions// private data and functions public :public : // public data.
Advertisements

CS110 Programming Language I
C++ Basics March 10th. A C++ program //if necessary include headers //#include void main() { //variable declaration //read values input from user //computation.
Using Classes to Store Data Computer Science 2 Gerb.
Lab 8 User Defined Function.
Hand Crafting your own program By Eric Davis for CS103.
1 9/29/06CS150 Introduction to Computer Science 1 Loops Section Page 255.
©2004 Brooks/Cole Chapter 6 Methods. Figures ©2004 Brooks/Cole CS 119: Intro to JavaFall 2005 Using Methods We've already seen examples of using methods.
1 11/05/07CS150 Introduction to Computer Science 1 Functions Chapter 6, page 303.
Arrays Recitation – 10/(9,10)/2008 CS 180 Department of Computer Science, Purdue University.
Programming Assignment #3 CS-2301, B-Term Programming Assignment #3 User-defined Functions Due, November 18, 11:59 PM (Assignment adapted from C:
COMP 110 More Loops and Strings Tabitha Peck M.S. February 18, 2008 MWF 3-3:50 pm Philips
COMP 110 Classes Tabitha Peck M.S. February 20, 2008 MWF 3-3:50 pm Philips
CS November 2009 Exceptions in Java. Prof. Gries is lecturing in India for the next 7 days or so. Today’s reading: Ch. 10. Next lecture’s reading:
CS 117 Spring 2002 April 5, Exam 3 April 10 –files, arrays, strings, classes –practice exams are up –review on Monday.
1 10/30/06CS150 Introduction to Computer Science 1 Functions Chapter 3, page 313.
CS 241 – Computer Programming II Lab Kalpa Gunaratna –
CS 240 – Computer Programming I Lab Kalpa Gunaratna –
CS 31 Discussion, Week 4 Faisal Alquaddoomi, Office Hours: BH 2432, MW 4:30-6:30pm, F 12:30-1:30pm (today)
CS 241 – Computer Programming II Lab Kalpa Gunaratna –
CS 240 – Computer Programming I Lab Kalpa Gunaratna –
CS 241 – Computer Programming II Lab Kalpa Gunaratna –
CS 241 – Computer Programming II Lab Kalpa Gunaratna –
CS 241 – Computer Programming II Lab Kalpa Gunaratna –
CS 240 – Computer Programming I Lab Kalpa Gunaratna –
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Writing Static Methods Up until now, we have been USING (calling) static methods that other people have written. Now, we will start CREATING our own static.
CS110 Programming Language I Lab 4: Control Statements I Computer Science Department Spring 2014.
Introduction to Methods Shirley Moore CS 1401 Spring 2013 cs1401spring2013.pbworks.com April 1, 2013.
CS 240 – Computer Programming I Lab Kalpa Gunaratna –
CS 31 Discussion, Week 5 Faisal Alquaddoomi, Office Hours: BH 2432, MW 4:30-6:30pm, F 12:00-1:00pm (today)
CS 240 – Computer Programming I Lab Kalpa Gunaratna –
Print Row Function void PrintRow(float x[ ][4],int i) { int j; for(j=0;j
Lab 9 Exercises.
JAVA METHODS (FUNCTIONS). Why are they called methods? Java is a strictly object-oriented programming language Methods are functions inside of objects.
CS 241 – Computer Programming II Lab
CS 241 – Computer Programming II Lab
Introduction to Computing
CS 240 – Computer Programming I Lab
Milner Library Welcomes You!
Yanal Alahmad Java Workshop Yanal Alahmad
Announcements Homework #5 due Monday 1:30pm
Announcements Exam 3 grades are posted online
Renaissance Place at Grand Community Activities Bldg. May 2018
Introduction to Computer Programming
Michele Weigle - COMP 14 - Spr 04
COMP 110 Information hiding and encapsulation
Online Math Tutoring Now you can get the tutoring help you need from anywhere you have access to a computer.
Introduction to Programming
Cs212: Data Structures Computer Science Department Lab 7: Stacks.
Located on the first floor of Nitschke Hall Room 1010
Object Oriented Programming (OOP) LAB # 5
Cs212: DataStructures Computer Science Department Lab 3 : Recursion.
CS1110 Lec Oct 2010 More on Recursion
Arrays, Part 1 of 2 Topics Definition of a Data Structure
CMSC104 Problem Solving and Computer Programming Spring 2010
CS 336/536: Computer Network Security Fall 2015 Nitesh Saxena
Please save these important dates
Arrays, Part 1 of 2 Topics Definition of a Data Structure
Dbas.
CMSC104 Problem Solving and Computer Programming Fall 2009 Section 2
EECE.2160 ECE Application Programming
CS 336/536: Computer Network Security Fall 2014 Nitesh Saxena
CS148 Introduction to Programming II
COMS W1004 Introduction to Computer Science
CMSC104 Problem Solving and Computer Programming Spring 2010
Arrays, Part 1 of 2 Topics Definition of a Data Structure
CSCE 206 Lab Structured Programming in C
EECE.2160 ECE Application Programming
CS Problem Solving and Object Oriented Programming Spring 2019
Presentation transcript:

CS 240 – Computer Programming I Lab Kalpa Gunaratna – kalpa@knoesis.org http://knoesis.wright.edu/researchers/kalpa/

Contact Contact by e-mail Office hours kalpa@knoesis.org 376 Joshi Mondays & Wednesday 3:00 pm – 4:00 pm

Methods <access modifier> <return type> <method name>(<parameters>){ } Example: private int getAge() { return <something of int type>; } The above method returns an int value and some int value should be returned.

Example : public static void doCalc() { body } Since above method is of type “void” it does not return anything. Because it is “static” you can directly call it from anywhere using the class name it belongs to. If the class it belongs to is Calculations, it can be called by Calculations.doCalc(); .

In Lab Do the lab having one method to get user input for the size of the shae.

Post Lab Use methods to get user input for the character to print the shapes. Please follow the grading scheme when you do post labs and projects.