Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
Beginner Explanation
minenhle gcabashe
Greenhorn
Posts: 1
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi to all i would love to have an explanation of the below coding
// Stud no // Surname, Initials public class Movies { // instance variables private String name; private double price; private int year; // default constructor public Movies ( ) { name = ""; price = 0.0; year = 0; } // overloaded constructor public Movies (String name,double price,int year) { this.name = name; this.price = price; this.year = year; } // accessor methods public String getname() { return name; } public double getprice() { return price; } public int getyear( ) { return year; } // mutator methods public void change (int year ) { this.year = year; } // calculation method public void adjust ( ) { if ( year < 2000) { price = price - ( price * 0.15); price = price * 0.85; } else if ( year <= 2005) { price = price - ( price * 0.10); } else if ( year <= 2009) { price = price - ( price * 0.05); } } }// class
Jesper de Jong
Java Cowboy
Posts: 16084
88
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Welcome to the Ranch. Please
KeepItDown
- don't write in ALL-CAPITALS BECAUSE IT LOOKS LIKE YOU ARE SHOUTING.
What exactly do you want to know about the code you posted, do you have a more specific question than "an explanation"?
Jesper's Blog
-
Pluralsight Author Page
Tony Docherty
Bartender
Posts: 3323
86
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Welcome to the Ranch.
Please do as Jesper has suggested and ask a specific question about the code you have posted.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Collections.sort() : need guidance for my code
Need help putting comments in
jdbc
Reading unknown number of objects from InputObjectStream
please check this program
More...