48024 Lecture 4: Applications Programming

64 views1 pages
5 Jun 2018
School
Department
Course
Professor
Study 4: Methods and Strings
There are two different kinds of methods
o Procedure does something. Its name is a verb
usually. A procedure has an effect. A procedure
can call a function. It may use local variables,
which are deleted when the method exits. It
should not return anything
o Function returns something. Its name is usually a
noun. Functions do not have effects. A function
can call a function, but a function should not call a
procedure, as this may introduce side effects.
Both can have parameters.
If a function changes something, this is called a side
effect.
String Functions
String is a java class with a bunch of methods.
Boolean Functions
Tests true or false. It will return a Boolean value.
Process Break it down, Build it up
Break the program down into small achievable goals that build on each other.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 1 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Study 4: methods and strings: there are two different kinds of methods, procedure does something. It may use local variables, which are deleted when the method exits. It should not return anything: function returns something. A function can call a function, but a function should not call a procedure, as this may introduce side effects: both can have parameters. If a function changes something, this is called a side effect. String functions: string is a java class with a bunch of methods.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents