SlideShare a Scribd company logo
1 of 8
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All
rights reserved.
*
* Redistribution and use in source and binary forms, with or
without
* modification, are permitted provided that the following
conditions
* are met:
*
* - Redistributions of source code must retain the above
copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above
copyright
* notice, this list of conditions and the following disclaimer
in the
* documentation and/or other materials provided with the
distribution.
*
* - Neither the name of Oracle or the names of its
* contributors may be used to endorse or promote products
derived
* from this software without specific prior written
permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
class BicycleDemo {
public static void main(String[] args) {
// Create two different
// Bicycle objects
Bicycle bike1 = new Bicycle();
Bicycle bike2 = new Bicycle();
// Invoke methods on
// those objects
bike1.changeCadence(50);
bike1.speedUp(10);
bike1.changeGear(2);
bike1.printStates();
bike2.changeCadence(50);
bike2.speedUp(10);
bike2.changeGear(2);
bike2.changeCadence(40);
bike2.speedUp(10);
bike2.changeGear(3);
bike2.printStates();
}
}
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All
rights reserved.
*
* Redistribution and use in source and binary forms, with or
without
* modification, are permitted provided that the following
conditions
* are met:
*
* - Redistributions of source code must retain the above
copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above
copyright
* notice, this list of conditions and the following disclaimer
in the
* documentation and/or other materials provided with the
distribution.
*
* - Neither the name of Oracle or the names of its
* contributors may be used to endorse or promote products
derived
* from this software without specific prior written
permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
class Bicycle {
int cadence = 0;
int speed = 0;
int gear = 1;
void changeCadence(int newValue) {
cadence = newValue;
}
void changeGear(int newValue) {
gear = newValue;
}
void speedUp(int increment) {
speed = speed + increment;
}
void applyBrakes(int decrement) {
speed = speed - decrement;
}
void printStates() {
System.out.println("cadence:" +
cadence + " speed:" +
speed + " gear:" + gear);
}
}

More Related Content

Similar to Copyright (c) 1995, 2008, Oracle andor its affiliates. Al.docx

Similar to Copyright (c) 1995, 2008, Oracle andor its affiliates. Al.docx (20)

Readme
ReadmeReadme
Readme
 
Licenseewewewewew
LicenseewewewewewLicenseewewewewew
Licenseewewewewew
 
Third party attributions-click-to-call
Third party attributions-click-to-callThird party attributions-click-to-call
Third party attributions-click-to-call
 
License
LicenseLicense
License
 
Primavera manual
Primavera manual Primavera manual
Primavera manual
 
premavera p6
premavera p6 premavera p6
premavera p6
 
Primavera
PrimaveraPrimavera
Primavera
 
Pm ref man
Pm ref manPm ref man
Pm ref man
 
Legal notices
Legal noticesLegal notices
Legal notices
 
Legal notices
Legal noticesLegal notices
Legal notices
 
Legal notices
Legal noticesLegal notices
Legal notices
 
Avisos legales
Avisos legalesAvisos legales
Avisos legales
 
Legal notices
Legal noticesLegal notices
Legal notices
 
Legal notices
Legal noticesLegal notices
Legal notices
 
Legal notices
Legal noticesLegal notices
Legal notices
 
Leg
LegLeg
Leg
 
Open Source Licensing: Types, Strategies and Compliance
Open Source Licensing: Types, Strategies and ComplianceOpen Source Licensing: Types, Strategies and Compliance
Open Source Licensing: Types, Strategies and Compliance
 
License
LicenseLicense
License
 
Third party attributions
Third party attributionsThird party attributions
Third party attributions
 
Adobe products eula(2)
Adobe products eula(2)Adobe products eula(2)
Adobe products eula(2)
 

More from tarifarmarie

CASE GS-65 DATE 021309 (REVISED 010311) .docx
CASE  GS-65 DATE  021309 (REVISED 010311) .docxCASE  GS-65 DATE  021309 (REVISED 010311) .docx
CASE GS-65 DATE 021309 (REVISED 010311) .docxtarifarmarie
 
BBA 3551, Information Systems Management 1 Course Lea.docx
BBA 3551, Information Systems Management 1 Course Lea.docxBBA 3551, Information Systems Management 1 Course Lea.docx
BBA 3551, Information Systems Management 1 Course Lea.docxtarifarmarie
 
BUS 599 – Assignments and Rubrics © 2019 Strayer Unive.docx
BUS 599 – Assignments and Rubrics  © 2019 Strayer Unive.docxBUS 599 – Assignments and Rubrics  © 2019 Strayer Unive.docx
BUS 599 – Assignments and Rubrics © 2019 Strayer Unive.docxtarifarmarie
 
BEAUTY AND UGLINESS IN OLMEC MONUMENTAL SCULPTUREAuthor.docx
BEAUTY AND UGLINESS IN OLMEC MONUMENTAL SCULPTUREAuthor.docxBEAUTY AND UGLINESS IN OLMEC MONUMENTAL SCULPTUREAuthor.docx
BEAUTY AND UGLINESS IN OLMEC MONUMENTAL SCULPTUREAuthor.docxtarifarmarie
 
August 4, 2011 TAX FLIGHT IS A MYTH Higher State .docx
August 4, 2011   TAX FLIGHT IS A MYTH Higher State .docxAugust 4, 2011   TAX FLIGHT IS A MYTH Higher State .docx
August 4, 2011 TAX FLIGHT IS A MYTH Higher State .docxtarifarmarie
 
BHA 3202, Standards for Health Care Staff 1 Course Le.docx
BHA 3202, Standards for Health Care Staff 1 Course Le.docxBHA 3202, Standards for Health Care Staff 1 Course Le.docx
BHA 3202, Standards for Health Care Staff 1 Course Le.docxtarifarmarie
 
Assignment – 8600-341 (Leading and motivating a team effectiv.docx
Assignment – 8600-341 (Leading and motivating a team effectiv.docxAssignment – 8600-341 (Leading and motivating a team effectiv.docx
Assignment – 8600-341 (Leading and motivating a team effectiv.docxtarifarmarie
 
BIOEN 4250 BIOMECHANICS I Laboratory 4 – Principle Stres.docx
BIOEN 4250 BIOMECHANICS I Laboratory 4 – Principle Stres.docxBIOEN 4250 BIOMECHANICS I Laboratory 4 – Principle Stres.docx
BIOEN 4250 BIOMECHANICS I Laboratory 4 – Principle Stres.docxtarifarmarie
 
BHR 4680, Training and Development 1 Course Learning .docx
BHR 4680, Training and Development 1 Course Learning .docxBHR 4680, Training and Development 1 Course Learning .docx
BHR 4680, Training and Development 1 Course Learning .docxtarifarmarie
 
Business Plan 2016 Owners Mick & Sheryl Dun.docx
Business Plan 2016     Owners Mick & Sheryl Dun.docxBusiness Plan 2016     Owners Mick & Sheryl Dun.docx
Business Plan 2016 Owners Mick & Sheryl Dun.docxtarifarmarie
 
Assignment Guidelines NR224 Fundamentals - Skills NR224 .docx
Assignment Guidelines  NR224 Fundamentals - Skills NR224 .docxAssignment Guidelines  NR224 Fundamentals - Skills NR224 .docx
Assignment Guidelines NR224 Fundamentals - Skills NR224 .docxtarifarmarie
 
Brand Extension Marketing Plan 8GB530 Brand Extension Marketi.docx
Brand Extension Marketing Plan 8GB530 Brand Extension Marketi.docxBrand Extension Marketing Plan 8GB530 Brand Extension Marketi.docx
Brand Extension Marketing Plan 8GB530 Brand Extension Marketi.docxtarifarmarie
 
Building a Dynamic Organization The Stanley Lynch Investme.docx
Building a Dynamic Organization The Stanley Lynch Investme.docxBuilding a Dynamic Organization The Stanley Lynch Investme.docx
Building a Dynamic Organization The Stanley Lynch Investme.docxtarifarmarie
 
BBA 4351, International Economics 1 Course Learning O.docx
BBA 4351, International Economics 1 Course Learning O.docxBBA 4351, International Economics 1 Course Learning O.docx
BBA 4351, International Economics 1 Course Learning O.docxtarifarmarie
 
BSL 4060, Team Building and Leadership 1 Course Learn.docx
BSL 4060, Team Building and Leadership 1 Course Learn.docxBSL 4060, Team Building and Leadership 1 Course Learn.docx
BSL 4060, Team Building and Leadership 1 Course Learn.docxtarifarmarie
 
BHA 3002, Health Care Management 1 Course Learning Ou.docx
BHA 3002, Health Care Management 1 Course Learning Ou.docxBHA 3002, Health Care Management 1 Course Learning Ou.docx
BHA 3002, Health Care Management 1 Course Learning Ou.docxtarifarmarie
 
BBA 3551, Information Systems Management Course Learn.docx
BBA 3551, Information Systems Management Course Learn.docxBBA 3551, Information Systems Management Course Learn.docx
BBA 3551, Information Systems Management Course Learn.docxtarifarmarie
 
Afro-Asian Inquiry and the Problematics of Comparative Cr.docx
Afro-Asian Inquiry and the Problematics of Comparative Cr.docxAfro-Asian Inquiry and the Problematics of Comparative Cr.docx
Afro-Asian Inquiry and the Problematics of Comparative Cr.docxtarifarmarie
 
BBA 2201, Principles of Accounting I 1 Course Learnin.docx
BBA 2201, Principles of Accounting I 1 Course Learnin.docxBBA 2201, Principles of Accounting I 1 Course Learnin.docx
BBA 2201, Principles of Accounting I 1 Course Learnin.docxtarifarmarie
 
ARH2000 Art & Culture USF College of the Arts 1 .docx
ARH2000 Art & Culture  USF College of the Arts 1 .docxARH2000 Art & Culture  USF College of the Arts 1 .docx
ARH2000 Art & Culture USF College of the Arts 1 .docxtarifarmarie
 

More from tarifarmarie (20)

CASE GS-65 DATE 021309 (REVISED 010311) .docx
CASE  GS-65 DATE  021309 (REVISED 010311) .docxCASE  GS-65 DATE  021309 (REVISED 010311) .docx
CASE GS-65 DATE 021309 (REVISED 010311) .docx
 
BBA 3551, Information Systems Management 1 Course Lea.docx
BBA 3551, Information Systems Management 1 Course Lea.docxBBA 3551, Information Systems Management 1 Course Lea.docx
BBA 3551, Information Systems Management 1 Course Lea.docx
 
BUS 599 – Assignments and Rubrics © 2019 Strayer Unive.docx
BUS 599 – Assignments and Rubrics  © 2019 Strayer Unive.docxBUS 599 – Assignments and Rubrics  © 2019 Strayer Unive.docx
BUS 599 – Assignments and Rubrics © 2019 Strayer Unive.docx
 
BEAUTY AND UGLINESS IN OLMEC MONUMENTAL SCULPTUREAuthor.docx
BEAUTY AND UGLINESS IN OLMEC MONUMENTAL SCULPTUREAuthor.docxBEAUTY AND UGLINESS IN OLMEC MONUMENTAL SCULPTUREAuthor.docx
BEAUTY AND UGLINESS IN OLMEC MONUMENTAL SCULPTUREAuthor.docx
 
August 4, 2011 TAX FLIGHT IS A MYTH Higher State .docx
August 4, 2011   TAX FLIGHT IS A MYTH Higher State .docxAugust 4, 2011   TAX FLIGHT IS A MYTH Higher State .docx
August 4, 2011 TAX FLIGHT IS A MYTH Higher State .docx
 
BHA 3202, Standards for Health Care Staff 1 Course Le.docx
BHA 3202, Standards for Health Care Staff 1 Course Le.docxBHA 3202, Standards for Health Care Staff 1 Course Le.docx
BHA 3202, Standards for Health Care Staff 1 Course Le.docx
 
Assignment – 8600-341 (Leading and motivating a team effectiv.docx
Assignment – 8600-341 (Leading and motivating a team effectiv.docxAssignment – 8600-341 (Leading and motivating a team effectiv.docx
Assignment – 8600-341 (Leading and motivating a team effectiv.docx
 
BIOEN 4250 BIOMECHANICS I Laboratory 4 – Principle Stres.docx
BIOEN 4250 BIOMECHANICS I Laboratory 4 – Principle Stres.docxBIOEN 4250 BIOMECHANICS I Laboratory 4 – Principle Stres.docx
BIOEN 4250 BIOMECHANICS I Laboratory 4 – Principle Stres.docx
 
BHR 4680, Training and Development 1 Course Learning .docx
BHR 4680, Training and Development 1 Course Learning .docxBHR 4680, Training and Development 1 Course Learning .docx
BHR 4680, Training and Development 1 Course Learning .docx
 
Business Plan 2016 Owners Mick & Sheryl Dun.docx
Business Plan 2016     Owners Mick & Sheryl Dun.docxBusiness Plan 2016     Owners Mick & Sheryl Dun.docx
Business Plan 2016 Owners Mick & Sheryl Dun.docx
 
Assignment Guidelines NR224 Fundamentals - Skills NR224 .docx
Assignment Guidelines  NR224 Fundamentals - Skills NR224 .docxAssignment Guidelines  NR224 Fundamentals - Skills NR224 .docx
Assignment Guidelines NR224 Fundamentals - Skills NR224 .docx
 
Brand Extension Marketing Plan 8GB530 Brand Extension Marketi.docx
Brand Extension Marketing Plan 8GB530 Brand Extension Marketi.docxBrand Extension Marketing Plan 8GB530 Brand Extension Marketi.docx
Brand Extension Marketing Plan 8GB530 Brand Extension Marketi.docx
 
Building a Dynamic Organization The Stanley Lynch Investme.docx
Building a Dynamic Organization The Stanley Lynch Investme.docxBuilding a Dynamic Organization The Stanley Lynch Investme.docx
Building a Dynamic Organization The Stanley Lynch Investme.docx
 
BBA 4351, International Economics 1 Course Learning O.docx
BBA 4351, International Economics 1 Course Learning O.docxBBA 4351, International Economics 1 Course Learning O.docx
BBA 4351, International Economics 1 Course Learning O.docx
 
BSL 4060, Team Building and Leadership 1 Course Learn.docx
BSL 4060, Team Building and Leadership 1 Course Learn.docxBSL 4060, Team Building and Leadership 1 Course Learn.docx
BSL 4060, Team Building and Leadership 1 Course Learn.docx
 
BHA 3002, Health Care Management 1 Course Learning Ou.docx
BHA 3002, Health Care Management 1 Course Learning Ou.docxBHA 3002, Health Care Management 1 Course Learning Ou.docx
BHA 3002, Health Care Management 1 Course Learning Ou.docx
 
BBA 3551, Information Systems Management Course Learn.docx
BBA 3551, Information Systems Management Course Learn.docxBBA 3551, Information Systems Management Course Learn.docx
BBA 3551, Information Systems Management Course Learn.docx
 
Afro-Asian Inquiry and the Problematics of Comparative Cr.docx
Afro-Asian Inquiry and the Problematics of Comparative Cr.docxAfro-Asian Inquiry and the Problematics of Comparative Cr.docx
Afro-Asian Inquiry and the Problematics of Comparative Cr.docx
 
BBA 2201, Principles of Accounting I 1 Course Learnin.docx
BBA 2201, Principles of Accounting I 1 Course Learnin.docxBBA 2201, Principles of Accounting I 1 Course Learnin.docx
BBA 2201, Principles of Accounting I 1 Course Learnin.docx
 
ARH2000 Art & Culture USF College of the Arts 1 .docx
ARH2000 Art & Culture  USF College of the Arts 1 .docxARH2000 Art & Culture  USF College of the Arts 1 .docx
ARH2000 Art & Culture USF College of the Arts 1 .docx
 

Recently uploaded

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Recently uploaded (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Copyright (c) 1995, 2008, Oracle andor its affiliates. Al.docx

  • 1. /* * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. *
  • 2. * - Neither the name of Oracle or the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT
  • 3. LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ class BicycleDemo { public static void main(String[] args) { // Create two different // Bicycle objects Bicycle bike1 = new Bicycle(); Bicycle bike2 = new Bicycle(); // Invoke methods on // those objects bike1.changeCadence(50); bike1.speedUp(10);
  • 5. * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * - Neither the name of Oracle or the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
  • 6. HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
  • 7. class Bicycle { int cadence = 0; int speed = 0; int gear = 1; void changeCadence(int newValue) { cadence = newValue; } void changeGear(int newValue) { gear = newValue; } void speedUp(int increment) { speed = speed + increment; }
  • 8. void applyBrakes(int decrement) { speed = speed - decrement; } void printStates() { System.out.println("cadence:" + cadence + " speed:" + speed + " gear:" + gear); } }