Object Oriented Design - Role Playing Game Template
I have finished studying the basics of object-oriented principles(e.g. composition, inheritance, polymorphism, abstract classes, and interfaces) in my book so I have decided to try and put everything...
View ArticleSorting a deque in Python
So I have a deque of people objects. A person contains a name and an age, that's it. I'm trying to figure out how to sort the deque on the name field. p1 = person("Tom", 31) p2 = person("Jason", 33) p3...
View Articlevb.net counting
Please help This program is to check if the unit is pass or fail unit 1 all step pass = pass unit 2 one of the step is fail = fail Unit 3 all step pass = pass 1. user browse txt file display in textbox...
View ArticleSyntax Error In INSERT INTO Statement
Hello guys. So I'm creating a membership system for my project in school. My problem is when I'm going to add a new member and save it, this error occurs and it says, "OleDbException was Unhandled,...
View ArticleProblem: C++/SDL Game Applcation Exits When Calling an SDL Function
I'm currently working on a game (and framework) using C++ and SDL. I have implemented a state manager, and each game state (main menu, playing, and pause) have their own class. Within those classes are...
View ArticleMouse Listener Is Not Working
I created a custom JPanel, and want to add a MouseListener to it. the JPanel is a class, so I am not sure if this is allowed or not. import javax.swing.*; import java.awt.*; import java.awt.event.*;...
View ArticleFading rgb color after converting to cie lab space?
I have a program which fades between rgb colors, but since RGB colors are linearly interpolated it does not look like they are making even steps so i made a function that can converted the RGB input to...
View ArticleFading color using frequency and amplitude
I have a program that fades two RGB colors. Since the fading of color can be interpreted as a wave, i want to know how do i change my update color function so that i can define a frequency and...
View ArticleHow can I determine if a 5 digit number is a palindrome using an array
I've searched everywhere and have found lots of examples on how to tell if it is a palindrome but none showing how to do it with an array. So far I have, public static void main(String[] args) { while...
View ArticleSort Program
Hi, needing help with c programming. Im suppose to make a "poor mans" variation to the Sort function built into unix. The program is suppose to read in a file and sort the contents of the file. So its...
View ArticleProblem reading ints and Strings from single line of CSV text file, C
Well I am going to get right to it and say I am 100% clueless as I have scoured the web and texts looking for a clear cut approach and solution to my issue. My title really says it all, I have a file...
View ArticleChange Panels with Radio Buttons
Hi everyone! I am doing a project right now and for part of it, I need to change what JPanel is visible when I click on a different radio button. I am having a lot of trouble figuring out how to do...
View ArticleComparable collections
I am at the end of my rope trying to figure this one out. Unfortunately, the only resource I have is a book, and I am simply not "getting it." The idea here is very simple. I want to pass two arrays...
View Articledo while not terminating
obviously this program isn't finished, but I'm trying to test its termination and, well, it wont. /*Write a program with a loop taht lets the user enter a series of integeres. The user should enter -99...
View Articlebtree insert keys problem
Hi, I'm in the process of implementing a btree. I'm able to insert the keys into the correct positions (or so I think) while without breaking any invariants. The only problem I seem to be having is...
View ArticleDatagridview items not showing in Combobox.
If I put the code on the same form I have the Datagridview it is working. But if the put it on another form Datagridview items is now working. Private Sub frmUpdateStudent_Load(sender As System.Object,...
View ArticleHow do i initialize/fill my 2-D array?
Hi, this is a homework problem. I do not understand how to fill each column separatly. There are 24 rows and two columns. The left column is supposed to hold multiples of pi/2, and the right column is...
View ArticleHi All, why this always goes to "thats a miss!" & Ill
If you enter 3 1 you should get a hit and the game board would be updated to have an H at the coordinates entered at least that is how I thought it would work What did I miss?? Thank you for your time....
View ArticleSimple question, how do I add double elements to my 1D array (java)?
My assignment was to divide 2 pi by 100 and take the cos of each value and put them into an array, I don't know why I am having errors but when i run the program i get weird symbols. public class...
View ArticleJMenu Actionlistener isnt creating a new a new panel like it should
import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.io.IOException; import javax.swing.*; public class...
View Article