CS 140 Study Guide - Quiz Guide: Boolean Algebra

113 views8 pages

Document Summary

A class is a type of code that describes a particular type of object and specifies fields and method. An object has 2 functions: it stores data called fields. Fields: pieces of data stored in an object. Method: the operations that an object can perform. When creating objects from a class, use the form class object = new class(); A method is used to break down a problem into small manageable pieces. Public static int sum( int num 1, int num2) Public static int sum (int num 1, int num 2) int result; Returning a string value customername = fullname ( hiloni , kadakia ); Public void setname( string n ) name =n ; Store driver file guava. setproductname("guava"); // set name for the product guava. setproductnumber(4257); // set number for the product. Product guava = new product(); // create new product. For (int i=0, i

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

Related textbook solutions

Related Documents

Related Questions