Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - KadeBL_ID12958

Pages: [1] 2 3 4 5 6 ... 8
1
   I have a slow paced, badly taught computer science class in which we use "JCreator" as our JRE. The class is pretty easy despite being poorly taught, as all of the content was taken from another teacher from another school, and the teacher shows signs of not knowing what she's talking about, but that's not important.

   I came to an area in the content that was written very peculiarly and i can't seem to understand it. What i need to do for an assignment is to find the mean, median, and mode of some arrays in order to display that I learned from the passage, which isn't making much sense. I don't really know where to start. I'll post the code by itself to give you some context on what i'm trying to find out. I'd appreciate it if any of you could help me with this. (I'm not asking you to do it, i'm really just trying to figure it out). What exactly does toString and fill do, and
is list[index] actually just an identifier/variable or is the "index" between brackets a reserved word?
Code: [Select]
import java.util.Arrays;
import java.util.Random;


public class TextLab06st
{

public static void main(String args[])
{
System.out.println("\nTextLab06\n");
System.out.print("Enter the quantity of random numbers  ===>>  ");
int listSize = Expo.enterInt();
System.out.println();
Statistics intList = new Statistics(listSize);
intList.randomize();
intList.computeMean();
intList.computeMedian();
intList.computeMode();
intList.displayStats();
System.out.println();
}
}


class Statistics
{

private int list[]; // the actual array of integers
private int size; // user-entered number of integers in the array
private double mean; // used for the  80, 100 and 110 point versions
private double median; // used for the 100 and 110 point versions
private int mode; // used for the 110 point version only

public Statistics(int s)
{
size = s;
list = new int[size];
mean = median = mode = 0;
}

public void randomize()
{
// This provided method creates the same exact list of "random" numbers for every execution.
// You will learn more about this in Chapter 14.  For now just use the provided method.
Random rand = new Random(12345);
for (int k = 0; k < size; k++)
list[k] = rand.nextInt(31) + 1;  // range of 1..31
}

public void computeMean()
{


}

public void computeMedian()
{


}

public void computeMode()
{
// precondition: The list array has exactly 1 mode.


}

public void displayStats()
{
System.out.println(Arrays.toString(list));
System.out.println();
System.out.println("Mean:    " + mean);
System.out.println("Median:  " + median);
System.out.println("Mode:    " + mode);
}

}






(This is probably the wrong place for this thread, but I wasn't sure where else to put it. It was either this or mod discussion, but I don't remember if mod discussion was exclusively blockland or not. It's been a little while).



2
Off Topic / Blockland could be on steam!
« on: September 12, 2012, 07:11:28 PM »

AAAAAAHHH
VOTE IT UP AAAHH

3
Suggestions & Requests / can i have a link to the original hatmod?
« on: August 28, 2012, 06:06:02 PM »
can somebody link me to it? i searched and found one by pandan but the download was down. i'm probably really behind the times but i would like a link to that :) thanks in advance

4
I remember there was a click push by zack0wack0, but that's really old and outdated, and i don't think it's the one i see people currently using. can somebody link me?

two words.

sumo wrestling

EDIT: found it.

5
Help / Sound problems?
« on: August 22, 2012, 09:35:24 PM »
what's going on here is i can (for example) fire a weapon uncrouched and in first person, and it's normal. the second i crouch the game acts like i have my volume really high and the sound amplifies. I don't know what's causing it, but it didn't use to happen. it started a long time ago probably sometime last year, i just started getting more annoyed with it.

help? is this normal?

6
Gallery / Overlook Penintentiary - (WIP)
« on: August 19, 2012, 11:10:36 PM »
I decided to drop a topic here for it, as i realized posting it would help me keep motivated a lot longer. As you guys can keep me accountable! Anyways, here's my humble start, just the little island right in front of the actual prison island.


 
This is the map I'm using to determine the shape of the land. I may start on the actual city at some point, but for now it's just the jail. I may open this to help when i do start the actual island, as kind of a community build dealy.



I know it's not much, but CC is appreciated, and motivation as well.

7
Off Topic / Kade=stressed, and it's affecting sleep
« on: August 18, 2012, 01:36:17 AM »
Hello everybody, lately i've started having trouble getting to sleep. i used to be fine, but now i start to take a while to fall asleep, and after lying there for some time, god awful thoughts start to pop in. they usually end up sending a kind of panic signal. at least i think so. i get a wave of cold and my heart rate rises and i usually frown at the thought. they are hard to get to gtfo. these thoughts have been keeping me up at night as much as i want to sleep.

i've asked my parents about something as simple as melatonin to help me fall asleep, though i'm not sure if it's a good idea until a doctor or something says so


tl;dr: Can't sleep, want to, wat do?



how 2 relieve stress? i'm obviously stressing about something.

8
General Discussion / How do i use colorsets with the new update?
« on: August 14, 2012, 02:49:27 PM »
How do i use colorsets with the new update, since there isn't a selector thing?

9
Help / Friend can't open blockland without a crash
« on: August 14, 2012, 11:11:09 AM »
A friend of mine has been trying to get into his blockland, except when he opens it, it crashes. he said it crashes at the launcher and he believes it could be related to him having AMD graphics.. it's probably not

but he tried reinstalling and it still hasn't gotten fixed, so i need your help

10
Modification Help / Kade's Rookie Problems!
« on: August 13, 2012, 08:27:51 PM »
Kade's Rookie Problems
This topic is where i'll post all the problems i have on my first few mods.
Basically, i got tired of whining at the 3D model topic and realized we have this forum for a reason.

#1. I need some tutorials on Torquescript. i really need to learn to do that.

#2
My new weapon appears on RTB, but not in the addon list for the "custom" gamemode, meaning i can't enable it. i don't know if it's something i need to put in the zip folder, or what it was that i did wrong. help! :c



If i have more problems, i'll post them here.

11
Modification Help / Moved to modification help.
« on: August 13, 2012, 08:24:43 PM »
title.



12
Suggestions & Requests / Skybox request!
« on: August 10, 2012, 01:18:41 PM »


I'd like that really dark foggy sort of looking sky, and add the batman signal too please :3
this'll be helpful with something i'm working on.

13
Okay, so you see this saw trap here?


Well what i want is this, have half of it be able to be stuck into the ground before becoming stuck. that way, we could have saw traps coming out of walls and the ground.


However, it'd be a little awkward to have that just sticking out, so a new model may be used.

also there should be a saw trap that knocks back and forth between a certain length. kind of like the blades on koth_sawmill in tf2.



If anybody makes this, i love you :3

14










what a moron.

zealot came onto irc and started bitching about how "brickybob steels keys ono!"

15
Games / saints row 3 glitch
« on: July 15, 2012, 01:35:31 PM »
I'm at the belgian problem, and apparently this is a glitch where there is no cutscene file or something so like i keep falling on a ball yelling "get off my damn ball" then i get a two second window to kill a brute who knocks me off and kills me

wat do :c

Pages: [1] 2 3 4 5 6 ... 8