Computer - { return processor; } public void...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/** * @author Ran Wang (ranwang ) * @author Rithvik Kasireddy (rrk24) * @version (2010.08.27) */ public class Computer { String processor;// declaring the string int numCores;// declaring the int double processorSpeed;//declaring the double public Computer (String processor1, int cores, double speed)// constructor which intakes a string, int and a double { processor=processor1; numCores= cores; processorSpeed=speed; } /** These are a bunch of setters and getters that manipulate and get the various fields of data */ public String getProcessor()
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { return processor; } public void setProcessor(String pro) { processor= pro; } public int getNumCores() { return numCores; } public void setNumCores(int core) { numCores= core; } public double getProcessorSpeed() { return processorSpeed; } public void setProcessorSpeed(double ps) { processorSpeed= ps; } public double computePower() { return (numCores*processorSpeed); } public String toString() { return processor+", "+numCores+" cores at "+processorSpeed+"GHz"; } } }...
View Full Document

Page1 / 2

Computer - { return processor; } public void...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online