<p>1) @Jnelsonmarka one of the best suggestions I can put forth is whenever you are stuck,logic or otherwise, consult google and especially the website I told you about - stackoverflow.</p>
<p>2) I would have liked it if you told me what language are you using atm. But I will just consider you are using java.</p>
<p>3) Logical errors are a matter of concern, because as you go along, it will start becoming a major component of any program you write. Okay let’s look at it this way - </p>
<p>How Do You Write a Program from Scratch? You can follow this method. Let’s take the example of Celsius to Farenheit coversion.
So lets segregate the thinking process ( This would help alot in advanced stuff as well ) </p>
<p>1) Objective: list what it should do :
Take input from the user.
Store it in a variable.
Convert it to farenheit.
Store that value in another variable.
And display the value to the user. </p>
<p>2) Algorithm : For basic programs this is kinda useless, but you will need this constantly afterwards : </p>
<p>Here, the algorithm is basically the conversion formula – c/5 = f-32/9
since we are converting from c to f , the modified formula is — (c*9)/5 +32=f right?
this is our working algorithm. </p>
<p>3) What kind of program is it? Here we have an option between terminal based, GUI(graphical user interface) based or applet based. We are choosing the terminal based approach.
4) Tools : Having selected all of that, what do we need to import into the program :
Here they are:
- The Scanner Class (for user input)
- The language class and the math class, but these are imported by default so no need to write it into code. </p>
<p>5) Finally comes the code. I suggest you first write a no-frills sctatch (syntax doesn’t matter much) version on paper and then transfer it to the computer and debug. </p>
<p>For the Conversion the code is — </p>
<p>import java.util.Scanner;
public class conversion
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
System.out.print(“Enter the Celsius value: “);
int c= in.nextInt(); // we are only dealing with integers here
int f= (c*9)/5+32;
System.out.print(”
In Farenheit:”+f);
}
}</p>
<p>Using this pattern of thinking( or writing stuff down) you can superimpose it on any sort of program, even the i tunes one.This is even the order in which most programmers think:- objective/need → algorithm or the thing that will make it tick —> resources or tool I will need —> a scratch version of the code —> a final and debugged version of the code —> compile it , pack it and ship it.</p>
<p>Apply it to the itunes thing and see what you come up with. An itunes program will need some things wont it? 1 or 2 APIs, file management and a graphical interface. Plus it can have several choices of algorithms to deal with the specifications of the program and a GUI.</p>
<p>Cheers and Good Luck. Also, I sent you a PM regarding the matter.</p>