How to think like a programmer
I know this question might sound stupid but just curious that how a person can think like a programmer?. I have read 3 books on core java, Whenever i write programs i will use the OO Methadology which is to use encapsulation, Inheritance and polymorphism.
I can write programs using Maps, Sets, collections, JDBC, as long no math is requires like extracting the last name, connecting to database and stuff like that
But i suck big time in Math. i mean there was a problem yesterday i thought to work on it to capitalize the first word of the string even the one after the space and i can only capitalize the first word not the one after the space. i got help from the forums and then only i can do it. I know no one can tell me how to imporve it or you might? if you do then it will be a great help.
To schumacher:
I am vissually imppaired and so I can relate to your fustrations in math. People don't realize that math is a very visual subject. However I have written a few programs in various langauges and if I run into a crazzy math probelm I look it up on the net and usually find an answer to my question. Or, I try to visualize the problem in my head and look at it from different angles which sometimes helps.
You sound really intelegent in Java. I am just learning it, I'm used to lanaguages like basic, visual basic, c, c++. I am having trouble learning the .Net part of Visual C++.Net but it all takes time.
Happy programming
yea but how much i mean wow after reading 3 great books and going to sun tutorial? i am just not good in math part like using for loops and doing some mathematical calculation by using some boolean expression like &&. i know i sound messed up. Thansk for your suggestion. its been a year now since i have been programming with java. like ok heres the problem counting vowels in each string. This will require some if/else statement like if character is a vowel increment the count if not then move on to the next character.
Lets see what happens but i am just too frustrated when i see some people over here in the forums answering questions i am like i WISH I CAN BE ONE OF THEM SOON. but still struggling.
Is this an actual program you wish to write? The counting of vowels in a string I mean,
Wait I've seen this problem in one of my books,
It was something like if character is [this]
then do
this
so the program would be something like
//Imports the Java Input/Output Libraries
import java.io.*;
//Declares main Class
public class Vowel {
//Main Method Declaration
public static void main(String args[]) throws IOException
{
String Last_Name;
String First_Name;
char vowel = a or e or i or o or u or y
small count = 0;
// Input stream for strings
BufferedReader in;
in = new BufferedReader(new InputStreamReader(System.in));
Vowel(); {
// Prompt User for Last Name
System.out.print("Please enter your Last Name: ");
Last_Name = in.readLine();
// Prompt User for First Name
System.out.print("Please enter your First Name: ");
First_Name = in.readLine();
if Last_Name = char
then count = 1
}
}
Look on the net for extracting values from a string
I hope the code above helps
Regards,
cyelinek
Cat 'N Mouse Computers eSupport Team