October 5th, 2007 at 11:20am
Under Forum
Java – constructor problems?
I am a beginner in Java programming and have run into this problem more than once. I am trying to write code for a class Microwave that has MicrowaveTest as well. My main problem right now is the constructor; here is the error message for it…
symbol : constructor Microwave(double,int,java.lang.String,java.lang.String)
location: class Microwave
Microwave myMicrowave = new Microwave (7.0, 9, “off”, “off” );
1 error
BUILD FAILED (total time: 0 seconds)
The problem lies with — new “Microwave” —
only the word Microwave has caused this output (I believe).
Does this have to do with the import java.util.Scanner; not being in and working properly, or is it something else, and if it is, could someone please guide me in the right direction?
Thank you so very much for all help!!
This is from the initial file:
public class Microwave
{
private double time;
private int tempLevel;
private boolean isOn;
private boolean turnLightOn;
public Microwave(double Time, int Temp)
{
time = 0.0;
tempLevel = 0;
isOn = true;
turnLightOn = false;
Then, I have what is on the Test file:
import java.util.Scanner;
public class MicrowaveTest
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
Microwave myMicrowave = new Microwave (7.0, 9, “off”, “off” );
Everything else is working properly; or at least no other errors are popping up.
Hope this is what you needed
thanks!
I have added the perimeters KegC, but I am still having the same problem; Microwave still has the red squigly line under it :( I have created new projects several times and still the same problem.
Microwave myMicrowave = new Microwave (“5:22″, “3″, “off”, “off”);
Thanks Tizio, KegC, and Active! You all lead me in the right direction; however, I was not able to get anything to work except just not including anything in the ‘new’ constructor:
public Microwave () – and on the test class:
Microwave myMicrowave = new Microwave ();
This is how I was able to complete this assignment and where the problem was. Three of you were right about what I should pay attention to and it is hard to decide on which to choose for best answer :(, but will decide on one anyway. As for Blackcome, you should not post to anything you have no clue about. Sorry, but stay away from coding bud!
As for the others, I have lots more to do, so subscribe or watch for more from me :)
Thanks again!
Best answer:
hmm can’t see any problem, post more code…
java.lang is always all imported, so you can write simply String (this should not be an issue anyway)
~~
you call the constructor this way:
new Microwave (7.0, 9, “off”, “off” );
but i can only see one kind of costructor, no overloading:
Microwave(double Time, int Temp)
so the “java” searches for a constructor that fits the “fingerprint” of the arguments double, int, String, String; but can’t find it…
at least one constructor arguments must be the same kind of the one of the caller,
public Microwave(double Time, int Temp, String A, String B)
but why do you use String when all you want is a on/off feature? use boolean instead!
at last you added still another way of calling
new Microwave (“5:22″, “3″, “off”, “off”);
and still there is no “prototype” matching (three strings)
fix this
By Barcode Scanner
September 17th, 2007 at 10:02pm
Under Forum
HP C6100 Scanner problems?
I have an HP C6100 all-in-one printer. All four of my computers were on a wireless network with it, but one of my compuers wasn’t working properly wih it, because it hadn’t been set up right the first time. Now I unistalled the software that came with the printer, but it won’t reinstall. It keeps saying that the ‘application failed to initialize properly.’ What do I do? By the way, all my computers are windows xp 2000, not mac.
Best answer:
I had a somilar problem, I think it was the same error on my hp scanner. Ended up needing a patch for windows XP. Available on the HP web site.
Downloaded and installed patch and now no problems.
By Barcode Scanner
June 16th, 2006 at 05:37am
Under Forum
Having Problems With My Wireless Signal?
I have no idea whats going on with my wireless signal. . . Could it be because of my Police Scanner? Can a police scanner interfere with wireless signals? I tried changing my Wireless Channel, but that didn’t work either. That only made my wireless computer stop connecting.
Best answer:
make sure that there is no Micorwave, Cordless Phones and / or any kind of device working with different sorts of Electro-Magnetic Waves near by the router.
By Barcode Scanner
October 18th, 2005 at 12:20am
Under Forum
What are problems associated with the current barcode system?
Propose a new product or system to improve the current system.
Develop on paper a new product or system that would solve these problems and also add new benefits to embedded information
Best answer:
One problem is that there are actually people out there who think that barcodes are the work of the devil. I’m not sure how anyone would address such irrationality. ?°)
By Barcode Scanner
August 1st, 2005 at 10:11am
Under Forum
metrologic barcode scanner problems?
I am using a Metrologic voyager MS9540 barcode scanner
it doesnt scan all the numbers on an item (eg. 05849680 will scan 584968) I need it to scan ALL the digits on ANY barcode into the field. the manual is just wayyyyyyyyyyyyyyyyyyyyyyyyy too complicated to figure it out… it has to be used in a convenience store enviroment. (today i scanned the code above and it showed me another item with the same digits so its a must)
I scanned a 3 muskateers barcode and it showed me a skittles with the same digits!!!!!!!!!!!!!!!!
please tell me how to do that… specifically what way to get it to do that
its draining
thanks in advance
Best answer:
Hi,
It looks to me like you’re reading UPC-E barcodes, which are the shorter retail codes typically seen in the U.S. The first digit, 0 in your case, is called the number system. The trailing digit (also a 0 in this case) is called the check digit. What you need to do is enable the transmission of those digits. So try the following:
1. Download the configuration guide for the scanner at ftp://ftp.metrologic.com/pub/download/productmanuals/00-02544.pdf
if you don’t already have it.
2. Open the configuration guide to page 3. Scan the barcode that says Enable UPC-E.
3. Turn to page 46 and scan the barcode that says Transmit UPC-E check digit.
4. Now turn to page 47 and scan the barcode that says Transmit Lead 0 on UPC-E.
If you take those steps you should now get all of the digits of your barcode.
If for some reason this doesn’t work for you, give a call to the Honeywell tech support team. Honeywell owns Metrologic now. You can reach them at 800-782-4263 option 4 for tech support. It doesn’t matter where you bought the scanner they will give you support.
For more information on barcodes and barcode scanners visit my website.
By Barcode Scanner