Tuesday, April 15, 2014
Accessing member variables in another class
both a class AND its member variables have to be declared public to be referenced by other classes.
Changing Member Variable Values
To change the value of a member variable from a static class method, the member variable must first be declared as static itself.
Stupid mistakes
One of the things that are kind of dumb which i did in this project is I forgot the first line of code in the whole project.
public classes and objects
If you have a class with a certain name x, and you want to have that class create an object y with different attributes from class x, you can create a public class y in the same project with constructors for a y object.
New Libraries
The new library that we have to work with is called number format. What the "currency" instance of this class does is it makes the number that is inputted look nicer by putting a dollar sign in front and rounding to two decimal places.
Subscribe to:
Posts (Atom)