Hey everyone. I was doing a simple test program today that my professor is asking us to do just to test to see if his Ant script works correctly and I came across a problem that is confusing me. My prof wants us (after created all of our homework class files) to create a TestProgram class where, basically like junit, tests our programs with his given input values. Well, I have never worked with args before (I know, depressing) but I gave it a ashot and got this error. TestProgram.java:16: main(java.lang.String[]) in Sum cannot be applied to (java.lang.String) program.main(arg[0]); ^ …

Member Avatar
Member Avatar
+0 forum 4

**Hello i am a noob when it comes to java so sorry if its obvious but the code below is giving me a error when i try to compile it, the error is: Exception in thread "main" java.lang.Error: Unresolved compilation problem: at goodcalculator.main(goodcalculator.java:127). Can anyone help me? ** CODE: import java.awt.*; import java.awt.event.*; import javax.swing.*; class goodcalculator extends JFrame { JButton add, subtract, multiply, divide; JtextField num1, num2; JLabel result, enter1, enter2; public goodcalculator() { setLayout (new GridBagLayout()); GridBagConstraints c =new GridBagConstraints(); enter1 = new JLabel("1st: "); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.gridy = 0; add(enter1, c); num1 = …

Member Avatar
Member Avatar
+0 forum 3

Hi I found this script from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189858 it uses getopt module for managing cmd arguments, but I need it to work on mobile phones. I want to make a Mobile app using this script but I cant figure out how to change the comand Args to simple raw_inputs. can somebody please help me in this(i.e. removing parseArgs() and argsCallBack()? I know that its not a polite request, but I really appreciate any help. thanks in advance class pyText2Pdf: def __init__(self): # version number self._version="1.1.1" self._IsoEnc=0 # formfeeds flag self._doFFs=0 self._progname="PyText2Pdf" self._appname = "".join((self._progname, " Version ", str(self._version))) # default font …

Member Avatar
Member Avatar
+0 forum 8

is there anyway to get the another application environmenat commandline argument Thx in Advance

Member Avatar
Member Avatar
+0 forum 1

Hi I have this code with a function that outputs a square filled with the given char but for the [CODE] square(4);[/CODE] I want it to just output a square like this [CODE] **** **** **** **** [/CODE] How would I do this without changing the function definition or using another function definition? [CODE]#include<iostream> using namespace std; void square(unsigned a, char b); int main(){ square(4, 'W'); square(4); system("pause"); } void square(unsigned a, char b){ for(unsigned i = 0; i< a; ++i){ for(unsigned j = 0; j< a; ++j) cout << b; cout << endl; } } [/CODE]

Member Avatar
Member Avatar
+0 forum 8

The End.