Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » I'm a total idiot -- For/Else/If Method? WHAT? (A desperate student in need. )
I'm a total idiot -- For/Else/If Method? WHAT? [message #816963] Fri, 09 March 2012 08:20 Go to next message
Vienne Sung is currently offline Vienne Sung
Messages: 1
Registered: March 2012
Junior Member
Hello there intelligent people. My name's Vienne, I'm a starving Arts student. What is an General Arts student, with absolutely no knowledge of Computer Sciences (or anything with computers, actually...) doing in the Eclipse Community Fourm asking for help? Answer: She overestimated herself. That's why.

I self-taught myself HTML when I was elementary school and thought to myself. Damn. I must be so fricking gifted with these coding nonsense. I immediately took a Computer Science course as an elective, thinking it would be a GPA booster. And it was, at first, I had a lot of fun creating my own website providing dessert recipes. But then JAVA came and completely destroyed everything. Nothing makes sense to me. Can you guys help me out?

Quote:

import java.util.Scanner;

/*
*
*
* Description: Draws a X.
*/

public class Tutorial1
{ public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int i,j;
System.out.print("Enter size of box: 4 ");
int size = sc.nextInt();

for (i=0; i < size; i++)
{
for (j=0; j < size; j++)
{
if ( (i == 0) // First row
|| (i == size-1) // Last row
|| (j == 0) // First column
|| (j == size-1) ) // Last column
System.out.print("*"); // Draw star
else
System.out.print(" "); // Draw space
}
System.out.println();
}
}
} //


I can't even do the basics. What am I doing wrong?

I need to 1)Draw a "X" made up of stars (*). I must prompt for the width of the X in stars. My requirements for this assignment is:
+1 - prompt for size of X
+4 - draw X of stars (receive +2 if can draw solid square of stars)

Re: I'm a total idiot -- For/Else/If Method? WHAT? [message #816985 is a reply to message #816963] Fri, 09 March 2012 08:42 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 3133
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2012.03.09 6:20, Vienne Sung wrote:
> Hello there intelligent people. My name's Vienne, I'm a starving Arts
> student. What is an General Arts student, with absolutely no knowledge
> of Computer Sciences (or anything with computers, actually...) doing in
> the Eclipse Community Fourm asking for help? Answer: She overestimated
> herself. That's why.
> I self-taught myself HTML when I was elementary school and thought to
> myself. Damn. I must be so fricking gifted with these coding nonsense. I
> immediately took a Computer Science course as an elective, thinking it
> would be a GPA booster. And it was, at first, I had a lot of fun
> creating my own website providing dessert recipes. But then JAVA came
> and completely destroyed everything. Nothing makes sense to me. Can you
> guys help me out?
>[snip]

Vienne,

This forum is for questions about setting up and using the Eclipse IDE.
It is not for Java questions. The places to ask those include
javaranch.com, jguru.com and stackoverflow.com. There are others still,
but those are really good places, especially the first.
Previous Topic:get compilation unit object for php
Next Topic:Terminal view plugin
Goto Forum:
  


Current Time: Mon Jul 28 22:42:46 EDT 2014

Powered by FUDForum. Page generated in 0.01741 seconds