Credit Cards | Credit Cards | Credit Cards | Loans | Advertising
Java Programmer for hire [Archive] - PCMech Forums

PDA

View Full Version : Java Programmer for hire


Colb
04-08-2003, 12:18 AM
I have a Java project due and I have no idea how to do it. Does anyone know of a website that you can post your project and have them do it for a price?

mattg2k4
04-08-2003, 08:07 PM
First, buying the finished project from some programmer isn't very honest. If I were your programming teacher I'd flunk you if I found out.

If you post what the project is about, I'm sure someone here could help you complete it. I don't know much about Java myself, but I'm good in C++ and I'm sure it could be applied to your project.

Colb
04-08-2003, 08:15 PM
Teacher wants us to find this stuff on the web...prob is I can't.

I also posted this stuff on a Java forum, and because I have no idea how to to do basic java...they wont help me...and I understand that.

This is an elective class I am taking, I thought because I know a little hardware that learning software side would not be too bad...I was wrong. Everybody else in the class are all programmer majors and have taken a class before concernign c++ which is helping them alot in this class. I am a management major that has no idea what I am doing.

The teacher allready knows my situation, and allready told me not to worry if I dont miss class, which I never do anyway.

So...

eshaft716
04-08-2003, 08:34 PM
what exactly is the program supposed to do?

Colb
04-08-2003, 09:52 PM
ok, check this out:

Write an HTML file that will have the Javascript to do the follwing

[1]. Loop until -99 is entered

[2]. Display a Menu of the following choices

1. Enter numbers into an array of 10 integers.
2. Display the numbers in table form
3. Compute a bubble sort routine on the array
4. Compute a insertion sort routine on the array
5. Compute a quick sort routine on the array
6. Display the array in reverse
7. Display the maximum, minimum, and average elements of the array.
8. Continue (anything but -99) or Exit (-99)

A you can see...it is not really 1 program but a combination of things to "just do".

mattg2k4
04-11-2003, 03:33 AM
So is this a javascript or Java project?

While I'm only the slightest bit familiar with javascript, and only familiar with java due to its similarity to c++, if you know the basics of these languages, it seems a fairly simple task.

To make a loop until -99 is entered you will use a while loop, such as (in c++, you'll probably have to adjust it):

do{
code
code
code
}while(input != -99)

the variable "input" is what the user will be inputting to the menu. The first part of your while loop will contain a series of if, then statements which will call the various sections of the program. You will have the initialize the input variable to a value that will not call any section of the program. Then you will have the code which displays the menu and recieves the use input. I'd bet there's a cleaner way to write this, but it's what first came to my mind.

To enter 10 numbers into an array, you'll define an array:
int array[10]
And input the numbers using a for loop:
for(int i=0; i<10; i++)
{
input number to array[i]
}

To display the numbers in table form will be dependent on your language, I don't know how things are outputted in java.

A bubble sort is fairly simple. You will use a loop to go through the array of numbers, and compare each number to the number succeeding it. Depending on how you're sorting it, assuming from smallest to greatest number, you will swap the elements of the array if the second element compared was smaller. This procedure will be run through the whole array until one pass was made without any swaps.

I'm not familiar with the next two sorting methods, so hopefully someone else can help you.

This should hopefully keep you busy for a bit, and I've got to get back to some homework. So good luck, tell me if this helps, and if not, tell us what you need to know.

Beholdereye
04-15-2003, 01:02 PM
here is a bubble sort that i wrote for my C# class,

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Bubble_Sort
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblBubble;
private System.Windows.Forms.Button btnID;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.Button btnGenerate;
private System.Windows.Forms.Button btnQuit;
private System.Windows.Forms.Button btnSort;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.Button btnDisplay;

const int length = 250;

private int [] list = new int [length];
//Declares the array of type int named list which has 250 elements
private bool flag;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblBubble = new System.Windows.Forms.Label();
this.btnID = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button();
this.btnGenerate = new System.Windows.Forms.Button();
this.btnQuit = new System.Windows.Forms.Button();
this.btnSort = new System.Windows.Forms.Button();
this.btnDisplay = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblBubble
//
this.lblBubble.BackColor = System.Drawing.Color.Lime;
this.lblBubble.Location = new System.Drawing.Point(0, 24);
this.lblBubble.Name = "lblBubble";
this.lblBubble.Size = new System.Drawing.Size(568, 440);
this.lblBubble.TabIndex = 0;
this.lblBubble.Click += new System.EventHandler(this.lblBubble_Click);
//
// btnID
//
this.btnID.Location = new System.Drawing.Point(592, 40);
this.btnID.Name = "btnID";
this.btnID.TabIndex = 1;
this.btnID.Text = "ID";
this.btnID.Click += new System.EventHandler(this.btnID_Click);
//
// btnClear
//
this.btnClear.Location = new System.Drawing.Point(592, 216);
this.btnClear.Name = "btnClear";
this.btnClear.TabIndex = 2;
this.btnClear.Text = "Clear";
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// btnGenerate
//
this.btnGenerate.Location = new System.Drawing.Point(592, 88);
this.btnGenerate.Name = "btnGenerate";
this.btnGenerate.TabIndex = 3;
this.btnGenerate.Text = "Generate";
this.btnGenerate.Click += new System.EventHandler(this.btnGenerate_Click);
//
// btnQuit
//
this.btnQuit.Location = new System.Drawing.Point(592, 256);
this.btnQuit.Name = "btnQuit";
this.btnQuit.TabIndex = 4;
this.btnQuit.Text = "Quit";
this.btnQuit.Click += new System.EventHandler(this.btnQuit_Click);
//
// btnSort
//
this.btnSort.Location = new System.Drawing.Point(592, 128);
this.btnSort.Name = "btnSort";
this.btnSort.TabIndex = 5;
this.btnSort.Text = "Sort";
this.btnSort.Click += new System.EventHandler(this.btnSort_Click);
//
// btnDisplay
//
this.btnDisplay.Location = new System.Drawing.Point(592, 176);
this.btnDisplay.Name = "btnDisplay";
this.btnDisplay.TabIndex = 6;
this.btnDisplay.Text = "Display";
this.btnDisplay.Click += new System.EventHandler(this.btnDisplay_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(672, 365);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btnDisplay,
this.btnSort,
this.btnQuit,
this.btnGenerate,
this.btnClear,
this.btnID,
this.lblBubble});
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void btnID_Click(object sender, System.EventArgs e)
{
lblBubble.Text = "Chris Tardivo\nclt175\nCS101,14499\nProject 5, 10 points";
}

private void btnQuit_Click(object sender, System.EventArgs e)
{
Application.Exit();
}

private void btnClear_Click(object sender, System.EventArgs e)
{
lblBubble.Text = "";
}


public void Swap(int[] x, int element)
{
int temp;
temp = x[element];
x[element]= x[element+1];
x[element+1] =temp;


}

public void Bubblesort (int [] array)
{
//Bubble Sort method
for (int pass=1; pass<array.Length; pass++)
for(int index=0; index<array.Length-1; index++)
if(array[index]>array[index+1])
Swap (array, index);
}

private void btnSort_Click(object sender, System.EventArgs e)
{
flag = true;
Bubblesort(list);
}
private void btnDisplay_Click(object sender, System.EventArgs e)
{
if (flag)
lblBubble.Text = "The Sorted List.\n";
else
lblBubble.Text = "The Unsorted List.\n";

for (int i=0; i<list.Length; i++)
lblBubble.Text += " " + list [i];
}

private void btnGenerate_Click(object sender, System.EventArgs e)
{
Random RandomNumber;
RandomNumber = new Random();
//creates random number generation

flag = false;
lblBubble.Text = length +"random numbers generated.\n";
for (int i=0; i<length; i++)
list [i] = (int)RandomNumber.Next(1000);
}

private void lblBubble_Click(object sender, System.EventArgs e)
{

}
}
}

Colb
04-15-2003, 09:24 PM
Thanks for the help. I had to turn in the project yesterday, but managed to find most of the info on java sites.

Again, thanks to everyone for helping.:)