HELLO every one:) >>


could any one help me to solve this program :icon_neutral: >>

and explain it to me >>

download the file bellow ....:$

Attachments

Nope. Too many "e"s in the title.

(Also, you haven't explained precisely what trouble you are having with the program.)

thaaaaanx my frind>>>>


in the file u'll find file called (A1) . It contains All the questions .. could u solve it and explain it to me how u solve it .

i'm sorry my frind ,

but 'm not a student . i'm only learner . i need to know more ,about programing .


i am so sorry

i'm sorry my frind ,

but 'm not a student . i'm only learner . i need to know more ,about programing .


i am so sorry

You're not a student?

SFDV3001 (Algorithms and Data Structures)
Semester 1, 2008
Due date: October 25, 2008
(10 %)

Post the code, what it's supposed to do, what you've tried, what you're stuck on, etc. But you need to ask a specific question, not a vague one, and no one is going to do the whole assignment for you.

i'm only learner . i need to know more ,about programing

You won't learn much asking others to complete things for you.

i need only the idea to solve it >> and i will do it by myselfe >>>

the general idea is: you analyse your assignment, check what kind of data (variables, Objects, ...) you'll need, what kind of actions must be performed on them, ...

then, you start creating your Objects, after which you create the code that uses them, you compile and run it

the general idea is: you analyse your assignment, check what kind of data (variables, Objects, ...) you'll need, what kind of actions must be performed on them, ...

then, you start creating your Objects, after which you create the code that uses them, you compile and run it

h'm sure i'll do these steps >>>

but i need more explaination

Comments
No, you need to show some effort.

h'm sure i'll do these steps >>>

but i need more explaination

you have done nothing yet, except for typing too much e's in pleeeeeze (which shoulc be, please) and a's in thaaaaaanx (where a simple 'thanks' would suffice).

but 'm not a student . i'm only learner . i need to know more ,about programing .

which means in a way, you are a student. whether it's for your work, personal use or college you're trying to learn, you're a "student" on this matter.

Just go to the sticky thread on top of this forum, where all the "how-to-get-started" tutorials are put, check some of them out. as you may have noticed, we are not eager to just download files, make your application while you sit back and wait for 'tha codezzzzzzzzz' to roll in. we are on the other hand, very willing to assist you in your attempts to learn programming in Java.

if you really need much more explanation to a logic approach to get started on easy applications, you might want to do a bit more looking up on the subject, before you start on the more difficult ones

as we know if the person dose not know how to find what he or she want . he/she has to ask others >>>


and i come to to ask my frinds .. not to teach me hot to write .

well.. that might be a good first step. making vocabulary mistakes in english will give you just a bit of trouble, compared to when you make mistakes in your Java code.

I hope you do realise, that I'm trying to help you, but you just ignore what I say to help you and focus on what I'm saying to get your attention

let's review what I've said so far that you have ignored:

- analyse the problem/ssignment
- make a decision on what (kind of) Objects you'll be needing, and create them if necessary
- develop what you have in your analysis

--> your response was that you need more explanation, so, since you seem to be in a very early stage of your learning process, if you've started it at all, that is, I advised you to:

- read the sticky topic with all the basic "how-to-start-with-java stuff and tutorials".
- start with simple things before moving on to larger applications.

once again, you failed to get that. I am trying to help you, I am pointing out that you are doing certain things a lot of people here think are annoying, making them less eager to help you,
YOU, on the other hand:
- have not done anything
- ignore all advise given to you
- ignore the fact that I am the only person still trying to help you, so decide to try and insult me.

you claim you can't find anything? you're not looking, otherwise, you would have found a lot, even if you didn't follow my advice to read the tutorials topic.
are you a learner? no, you are not. you have not even taken the time to write a simple "HelloWorld" program. you're not interested in learning, you're interested in us solving your problem, and afterwards re-use our sollution as your own.

seriously, if you truly want help, start putting some effort in it yourself

Are you dense? Stultuske just posted a number of different things to help you. If you don't understand a particular one, try to research it online or ask him to elaborate here. If you don't know any Java at all, which it seems like you do not, find a good tutorial online and read it. If you don't understand things in the tutorial, you can ask questions about it here. You're only going to annoy people if you don't have enough experience to know what an Object is, for example. READ

Hey Baaaaaaaaaaaaaaaaaaaarhhh aaaaaaaaaaaaallaaaaaaaakkaka
IIIIIIIIIIIIIIIIIII WWWWWWWWWWWWWWant to beeeeeeeeeeeeeeee YYYYYYYYYYYYoooouur frIIIend
What is your problem?
Have you any code?
Is it working?
If it isn't what are the errors you are getting?
Tell us we and will help you.

my problem is i want to solve the program >>

That's nice bahr_alhalak.
Then start doing it!
When you get stuck we will help. We are all diggers you have to do the first dig!

This topic and the person who started it are retarded! Any moderator, attention please!

i need the idea

You're best bet is to mark this one solved and start another thread with a better original question. Keep in mind the responses you've gotten to this one. It's been explained to you why you got them. Lose the chat-speak, ask a specific question, make it look like you've put in effort, and you'll probably get help. It's as close to a fresh start as you can get since if you start a NEW thread, there are a whole lot of people who will never see THIS thread and thus your odds of getting answers go way up. I'd say this thread is shot.

hi my frinds ,,,


what happen..there is no one want to help .. i do not why ,, i need only this progam ,, i stay in daniweb mor than one week and no one want 2 help ,,i do not no why ,,


please our frinds ,,, do not forget me

Comments
You refuse to show even the slightest effort.

hi my frinds ,,,


what happen..there is no one want to help .. i do not why ,, i need only this progam ,, i stay in daniweb mor than one week and no one want 2 help ,,i do not no why ,,


please our frinds ,,, do not forget me

dude, you answered me once that you don't come here to learn how to write, well, you certainly should learn how to READ.

you have been given way more help than you deserve, with your lazy attitude and your o-poor-me-nobody's-doing-my-work-for-me mentality.

you don't seem to want help, you want us to do your work, while you sit back and sip on a diet Coke while watching TV. won't happen.
read the last posts in this thread and do as you were recommended, or stop bothering us.

Lol wow, little trouble reading, to make it clear

Mark this as solved and create a new thread and show us you can try to do your work, do not give us an assignment, we will help YOU with your assignment not do it for you

Lol wow, little trouble reading, to make it clear

Mark this as solved and create a new thread and show us you can try to do your work, do not give us an assignment, we will help YOU with your assignment not do it for you

we've been saying that to him for almost a week :P
hopefully this time he tries to see the help in the posts even though there's no Java code there...

hi again ...

i tried 2solveit ,but there are some problem faced me .. and i'll insert what i did .>>>

This is the main class..the main problem in it how 2 print the array like the example which i show it 2 u ...

import java.awt.DisplayMode;
import java.util.Scanner;



public class mainClass {
	
	private static String[][] Cell;
	final static String normal="white";
	final String abnormal="green";
	final static String temp="red";
	
	
	public static void main(String []args){
	
		Scanner w = new Scanner(System.in);
		Cell c1 = new Cell();
		   //please implement the main method
			
			System.out.println("Please enter the size of the array: ");
			int size = w.nextInt();
			
			displayArray();

			c1.initializeColor(size);
			
			System.out.print("Please enter the the cordinates to chek: ");
			
			System.out.println("r: ");
			int x = w.nextInt();
			
			System.out.println("c: ");
			int y = w.nextInt();
			
			countCells( x, y);
			
			

	}//end main
	
	
	/*
	 *The method countCells is a RECURSIVE method whose job is to find
	 *how many cells are in the same blob as a given cell (i.e cell with
	 *specified coordinates x and y). The variable int size represents the
	 *size of the two-dimensional array. This value would have been provided
	 *by the user at the beginning of the main method.
         *Do NOT make any changes to the method declartion.
	 */
	
	public static int countCells( int x, int y){
		int count=0;
		
		for(int x1=0; x1<Cell.length; x1++)
			for(int y1=0; y1<Cell.length; y1++){
				 Cell[x][y]=normal;
			}
		
		for(int x1=0; x1<Cell.length; x1++)
			for(int y1=0; y1<Cell.length; y1++){
				if(getblobsize(x,y, Cell) > 0)
					count++;
			}
		System.out.print("The number of blobs: " + count);
		return count;
	
	}//countCells()
	



	private static int getblobsize(int r, int c, String Cell[][]) {
		
		if(r<0 || r>=Cell.length || c<0 || c>=Cell.length){
		return 0;
		}
		
		if(Cell[r][c] == temp || Cell[r][c] == normal){
			return 0;
		}
		
		else{
			int time=1;
			
			time += getblobsize( r - 1, c + 1, Cell);
			time += getblobsize( r, c + 1, Cell);
			time += getblobsize( r + 1, c + 1, Cell);
			time += getblobsize(r + 1, c, Cell);
			time += getblobsize( r + 1, c - 1, Cell);
			time += getblobsize( r, c - 1, Cell);
			time += getblobsize( r - 1, c - 1, Cell);
			time += getblobsize( r - 1, c, Cell);
			return time;

		}
	}
	


	
	/*
	 * The method diplayArray is provided for you to call when you want to
	 * display your array on the screen. You should know how and when to 
	 * to use this method in your program by looking at its declaration and
	 * the expected output.Do NOT make any changes to this method.
	 */

	public static void displayArray(Cell [][] ,int size){
		for(int i=0;i<size;i++){
			System.out.println();
			System.out.print("-");
			for(int j=0;j<size;j++){
				System.out.print("-+");
			}
			System.out.println();
			for (int j=0;j<size;j++){
				String color=cells[i][j].getColor();
				System.out.print("|"+color.charAt(0));
				
			}
			System.out.print("|");
			
		}//outer
		System.out.print("\n-");
		for(int j=0;j<size;j++){
			System.out.print("-+");
		}
	}//end displayArray()
	
}//end mainClass




This is the Cell class >>>>




public class Cell implements Interface1{
	
	private String color;
	final String normal="white";
	final String abnormal="green";
	final String temp="red";
	private int column;
	private int row;
	
	/*Please implement this class. Remember this class
	 * must implement all the methods declared in the interface
	 * Interface1.
	 */

	/**
	 * Method initializeColor will be used to initialize the color
	 * of each cell in the two-dimensional array.
	 * The cell can be one of two colors: "green" or "white". Whether 
	 * a cell will be "white" or "green" should be decided randomly.
	 * Since the assignment specifies that there should be more normal 
	 * (white) cells than abnormal (green) cells, you should devise an 
	 * algorithm that assigns:
	 * white: 70% of the time
	 * green: 30% of the time
	 * (hint:you can use Math.random() for this purpose)
	 */
	
	public void initializeColor(int size) {
		// TODO Auto-generated method stub
		Cell[][] Cell = new Cell[row][column];
		int d=(size*(70/100));
		int b=(size*(30/100));
		for (int size1 = 0; size1 < row; size1++){
			while(row <= d);{
				do([row] = setColor(normal););
				}
		}
			  for (int size1 = 0; size1 < column; size1++) {
					while(column <= b);{
						do([column] = setColor(abnormal););
						}
			  }
	}
	
	public String getColor() {
		// TODO Auto-generated method stub
		return null;
	}

	public void setColor(String color) {
		// TODO Auto-generated method stub
		this.normal;
		this.abnormal;
	}

	public void initializeColor() {
		// TODO Auto-generated method stub
		
	}


}

And this is the interface <>>>>




/**
 * Interface1 defines some constants and declares
 * some methods that must be implemented by the
 * class "Cell". The purpose of each method is
 * described below. Note the statement that says
 * public class Cell implements Interface1
 */
public interface Interface1 {
	final String normal="white";
	final String abnormal="green";
	final String temp="red";
	
	/**
	 * Method initializeColor will be used to initialize the color
	 * of each cell in the two-dimensional array.
	 * The cell can be one of two colors: "green" or "white". Whether 
	 * a cell will be "white" or "green" should be decided randomly.
	 * Since the assignment specifies that there should be more normal 
	 * (white) cells than abnormal (green) cells, you should devise an 
	 * algorithm that assigns:
	 * white: 70% of the time
	 * green: 30% of the time
	 * (hint:you can use Math.random() for this purpose)
	 */
	public void initializeColor();
	
	/**
	 * The method setColor is a typical setter method that
	 * sets the color of a given cell to a certain color.
	 * This method is needed especially to re-color a cell
	 * to a temporary color (i.e "red")
	 */
	public void setColor(String color);
	
	/**
	 * The method getColor will return the color of the 
	 * specified cell. This method is called to identify
	 * the color of the cell.
	 */
	public String getColor();

}

u told me try to solve it >>>


and i did what i can 2 do ...

if u do not have any idea about solving this program dont shar us >>

and thanx4 ur advise>>

This article has been dead for over six months. Start a new discussion instead.