Saturday, March 21, 2020

Guide to Doing Laundry in College

Guide to Doing Laundry in College Doing laundry in college can be a challenge - but it can also be easier than you might think. Just remember: you dont have to be psychic to do laundry correctly. But you do have to read, so just check the labels if youre not sure. Preparation Read the labels of anything unique. Have a fancy dress? Nice button-down shirt? New bathing suit? Pants or skirt made of a funky material? Anything that seems a little out of the ordinary might need extra care. A quick read of the tag instructions (usually found by the neck or waist or on the bottom inside left-side seam of shirts) can help prevent disasters. Anything needing special care or a certain water temperature should be separated from the rest.Sort out anything new. If you just bought a new, bright-red t-shirt, made tie-dye shirts with some friends, or have any other clothes that have dark (like black, blue, or brown) or bright (like bright pink or green) colors, these kinds of clothes might bleed (i.e., have their colors seep out and stain the rest of your clothes). Wash them separately on their first wash - but they should be good to join their friends for the next go-around.Separate clothes by color. Put the darks (blacks, blues, browns, jeans, dark towels, etc.) in one color and the lights in another (whites, creams, tans, pastels, etc.). Some colors, like light gray, can go in either pile, so feel free to move those around to make your loads around the same size. Washing Put one load of similarly colored clothes (e.g., darks or lights but not both) in the machine. A few rules here: dont squish them in. Dont pack them in. Just kinda throw them in so theres enough room for things to move and swim around once the machine fills with water. If you pack things in, they wont get clean and the detergent gets stuck on everything.Put in the soap. Read the instructions on the box or bottle. Dont necessarily use one full cap or one full cup; detergent companies like your money so they make it easy to put too much soap in. Put enough in for one load, which may be only half a cup. Read, read, read to find out how much you really need.Set the water temperature. A good rule of thumb to follow: Darks need cold water, lights need warm water, sheets and towels need hot water. Easy cheesy.Hit start! Drying Separate anything that cant go in the dryer. This may be something you found by reading the labels. It may also be things like bras with underwires, fancy underwear, bathing suits, or sweaters that would otherwise shrink from the heat.Put your clothes in the dryer. Take your clothes from the washer and put them in the dryer. If you want, you can add a dryer sheet; doing so will prevent static cling and make your clothes smell fantastic. Youll have to guesstimate how much time your clothes will need. If you have stuff that you dont want wrinkled, pull it out when its still a tad wet and hang it up. If you dont care, just dry it until everything is super dry and ready to go. Tips If you have nasty stains (like wine or dirt), try rubbing something on it before washing your clothes. (You can find stain-removal products near the laundry soap in any store.)If you love how clean clothes smell, consider putting a dryer sheet in each of your drawers, putting one between your towels, or hanging a few randomly in your closet.Because college laundry rooms have so many machines, consider having a night where you and your friends hang out and do something to pass the time while washing clothes. That way everyones clothes get clean and you can at least have some fun in the process.

Thursday, March 5, 2020

An Object in Java Represents a Real-World Object

An Object in Java Represents a Real-World Object An object in Java  - and any other object-oriented language  - is the basic building block of all Java applications and represents any real-world object you might find around you: an apple, a cat, a car or a human. The two characteristics that an object always has are state and behavior. Consider a person object. Its state might include hair color, sex, height, and weight, but also feelings of anger, frustration or love. Its behavior could include walking, sleeping, cooking, working, or anything else that a person might do. Objects form the very core of any object-oriented programming language. What is Object Oriented Programming? Hundreds of books have been written to describe the intricacies of object-oriented programming, but basically, OOP is based on a holistic approach emphasizing  re-use and inheritance, which streamlines development time.  More traditional procedural languages, such as Fortran, COBOL, and C, take a top-down approach, breaking down the task or problem into a logical, orderly series of functions. For example, consider a simple ATM application used by a bank. Before writing any code, a Java developer first will create a roadmap or plan on how to proceed, usually beginning with a list of all the objects that need to be created and how they will interact. Developers may use a class diagram to clarify the relationships between objects. Objects required for use in an ATM transaction might be Money, Card, Balance, Receipt, Withdrawal, Deposit and so on.  These objects need to work together to complete the transaction: making a deposit should result in a balance report and perhaps a receipt, for instance. Objects will pass messages between them in order to get things done. Objects and Classes An object is an instance of a class: here is the crux of object-oriented programming and the idea of re-use. Before an object can exist, a class on which it can be based must exist.   Perhaps we want a book object: to be precise, we want the book The Hitchhikers Guide to the Galaxy. We first need to create a class Book. This class could be the basis for any book in the world. It might look something like this: public class Book {String title;String author;   //methodspublic String getTitle({return title;}public void setTitle(){return title;}public int getAuthor(){return author;}   Ã‚  public int setAuthor(){return author;}// etc.} The class Book has a title and an author with methods that allow you to set or get either of these items (it would have more elements as well, but this example is just an excerpt). But this is not yet an object  - a Java application cant yet do anything with it.  It needs to be instantiated to become an object that can be used.   Creating an Object The relationship between an object and a class  is such that many objects can be created using one class. Each object has its own data but its underlying structure (i.e., the type of data it stores and  its behaviors) are defined by the class. We can create several objects from a book class. Each object is called an instance of the class. Book HitchHiker new Book(The HitchHikers Guide to the Galaxy, Douglas Adams);Book ShortHistory new Book(A Short History of Nearly Everything, Bill Bryson);Book IceStation new Book(Ice Station Zebra, Alistair MacLean); These three objects can now be used: they can be read, purchased, borrowed or shared.