Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 23 results for
dynamicprogramming
- Page 1
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by Sunshineserene
…event.WindowEvent e) { System.exit(0); }; });
DynamicProgramming
ut = new
DynamicProgramming
(); ut.setSize(700,700); // same size as …(g1); c.add(g1F); c.add(outputArea); } public
DynamicProgramming
(String sequence1, String sequence2) { this.sequence1 = sequence1; this…
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by Sunshineserene
Okay. Now, I run the Cell.java and
DynamicProgramming
.java as 2 different files. It can be compiled already. …(I created HTML file and use the
DynamicProgramming
.class file). Is it wrong to use
DynamicProgramming
.class? I tried using Cell.class…
Help needed for my java code
Programming
Software Development
13 Years Ago
by Sunshineserene
…] package com.ibm.compbio; public abstract class
DynamicProgramming
{ private Cell prevCell; private int score; … + ", prevCell=" + prevCell + "]"; } public
DynamicProgramming
(String sequence1, String sequence2) { this.sequence1 = sequence1; this.sequence2 = …
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by WargRider
yes, you need to either rename your class
DynamicProgramming
into Cell or change the word Cell into
DynamicProgramming
. You cannot create a constructor for one class in another. Use ECLIPSE IDE and it will show you why you get these errors, try to use IDEs when writing programs :)
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by Sunshineserene
…;]"; } } [/CODE] [CODE]public abstract class
DynamicProgramming
{ private Cell prevCell; private int score; private int …scoreTable; protected boolean tableIsFilledIn; protected boolean isInitialized; public
DynamicProgramming
(String sequence1, String sequence2) { this.sequence1 =…
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by jon.kiparsky
… they're just promises to implement something here. Any "
DynamicProgramming
" object (ie, any object extending this class) has to…;). That'll be something like [CODE]public class Dibble extends
DynamicProgramming
{ protected abstract Cell getInitialPointer(int row, int col) { // your code…
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by jon.kiparsky
This looks like you're trying to put a constructor for Cell in the
DynamicProgramming
class. That's not going to work so well.
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by jon.kiparsky
Okay, in that case you need a main method somewhere. Most likely you'd put it in
DynamicProgramming
, although some people like to make a separate class - "DynamicProgrammingMain.java" for that purpose. What main() does will depend on what the program is meant to do, but without it, it'll do nothing at all.
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by Sunshineserene
Okay. I do have a main method already. However, it has an error: "
DynamicProgramming
is abstract; cannot be instantiated" What do I do then?
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by jon.kiparsky
… my palm hitting my forehead - of course, you've got
DynamicProgramming
declared as abstract, which means it can't be instantiated…
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by WargRider
… in the class Dibble. Therefore when you write: [CODE] public
DynamicProgramming
(String sequence1, String sequence2) { this.sequence1 = sequence1; this.sequence2 = sequence2…
Re: How to use a variable in init() function when it's declared in main
Programming
Software Development
13 Years Ago
by Sunshineserene
…;main" java.lang.NullPointerException at Align.strip<
DynamicProgramming
.java:481> at Align.<init><…;
DynamicProgramming
.java:466> at AlignSimple.<init><
DynamicProgramming
.java:575> at NW….<init><
DynamicProgramming
.java:638> at MatchApplet.init<MatchApplet.…
Re: How to use a variable in init() function when it's declared in main
Programming
Software Development
13 Years Ago
by NormR1
An object reference variable at line 481 in
DynamicProgramming
is null. Look at that line of code and see what variable and then look to see why it is null.
Re: How to use a variable in init() function when it's declared in main
Programming
Software Development
13 Years Ago
by Sunshineserene
… java.awt.*; import java.awt.event.*; import javax.swing.*; class
DynamicProgramming
extends JApplet { TextArea outputArea; //JButton button; //JButton reset; //JTextField tF1…
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by WargRider
Ok, so cell is a different file, it DOES have a cnostructor right? Post the 2 different files' code here, and I will take a look and tell. I am not very well versed in Applets, but I can still help you. If you use System.out.println(); it will not work. I believe you have to use drawString in applets() :D
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by jon.kiparsky
[QUOTE=WargRider;1280869] Use ECLIPSE IDE and it will show you why you get these errors, try to use IDEs when writing programs :)[/QUOTE] Dunno about that one, WR. I've gotta put in a word for learning how to use the hammer and saw before you start in with the power tools. Or maybe the metaphor is more "learning to walk before you put …
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by jon.kiparsky
SunshinSerene - are you trying to run this as an applet or as an application? If you want it to be an application, you need a main() method somewhere. If you want to run it as an applet, you need to have a JApplet in the mix. Applets are a little complicated, but not terribly so. What is this all in aid of, anyway? What's the purpose of the code?
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by Sunshineserene
I want to run it as an application. It is dynamic programming.
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by Sunshineserene
If I remove every abstract words it doesn't work. I don't know how to do it.
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by jon.kiparsky
Grumble grumble grumble.... why was this abstract in the first place? I guess I gotta actually read your code now or something if I'm going to find out. That would be a lot easier ( == I'm more likely to actually do it) if I knew what it was you were trying to do with the code. What's the goal here?
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by Sunshineserene
To get the whole program working. Be able to compile without any error. I think I need to write a main or init() that can display the results. In that sense, a platform to show the results. Can you help me with that?
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by jon.kiparsky
WR - we can fight about Eclipse another time. It'll be fun. At least we agree that without an understanding of inheritance, it doesn't matter what coding environment you use, you're going to be pretty helpless. @Sunshineserene - this is [U]not [/U]what I meant. Please look up some tutorials on inheritance and the use of the "extends" …
Re: Help needed for my java code
Programming
Software Development
13 Years Ago
by WargRider
Yes, I dont want to argue and I definitely agree with that lol. I was saying is that it will help him understand what he does better is all. Or maybe its just me, but ya no need to argue :). I cannot agree with jon more, like I said before, you REALLY should not be doing this, honestly I feel like this was either a code you copied or that was …
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC