No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
About two weeks ago, I was given a simple project in Java II; code a program that displays an image, plays a sound, and has loop/play/stop buttons for the sound and zoom in/zoom out buttons for the image. I decided to go ahead in the book with this project to … |
|
Thanks so much for bothering to look at this n.n; I've been kind of confused in this class, mainly because I have no idea what the teacher's saying; her English isn't that great, and she has no in-class coding exercises so we're learning entirely from her crappy powerpoints. I'd have … |
|
[CODE]public class TVRemote { //initialize variables private int channel, vol; public TVRemote(){this(0,0);} public int getChannel(){return channel;} public void setChannel(int a){channel = a;} public TVRemote(int a, int b){setChannel(a); setVolume(b);} public int getVolume(){return vol;} public void setVolume(int b){vol = b;} public void channelUp(){ channel++; } public void channelDown(){ channel--; } public void … |
|
[CODE]import java.util.Scanner; public class MathTutor { Scanner input = new Scanner(System.in); int numQuestions; int choice; int numCorrect; public MathTutor (){ numQuestions = choice = numCorrect = 0; } public int getNumQuestions(){ { System.out.print("How many questions? "); numQuestions = input.nextInt(); if (numQuestions < 1) { System.out.println("Invalid - must ask at least … |