Basic computation assignments from Java class.