Quantcast

Jump to content


Buying someone to do my data structures homework *facepalm*


  • Please log in to reply
7 replies to this topic

#1 Guest_jcrgirl_*

Guest_jcrgirl_*

Posted 22 June 2011 - 01:24 PM

I don't know how long it would take someone to do these assignments for me (or for how long I'd need them to be done) but I'm seriously willing to pay like, 15$ per assignment. If you're good at Data Structures in C++ I don't think it would take you that long to do this stuff.

Don't give me that whole "If I don't do it, I'll never learn" ... I'm under a lot of pressure right now and taking this class over the summer was a huge mistake. Homework is like most of the grade and I can handle the exams on my own. I have calculus I'm taking with this (worst idea ever), so I can't really focus on this as much as I was hoping. It's so fast-paced and I'm super behind. I'm not going to drop this class because I'd lose $500 that I paid to take it and.... I won't be able to take classes I registered for next semester. (Fucking retarded cause none of them are even C++ anyway).

I do actually plan on learning this stuff, but while I catch up I really need some help doing these assignments.

The assignments come with a .h file that has the class/function prototypes and you usually have to make the implementation file or edit the .h
Header file contains pre condition and post condition. It's data-structures based... it also comes with a testing file and a grading file and a list of instructions.

So yeah, if you wanna help, PM me. Posted Image

NO, I'm not giving nudes in exchange for this (iargue) Posted Image

#2 Rambo

Rambo
  • 833 posts

Posted 22 June 2011 - 02:01 PM

Considering you paid $500 for the course, and this is detrimental to your grade I would ask to be paid more than $15 per assignment ;)

#3 Guest_jcrgirl_*

Guest_jcrgirl_*

Posted 22 June 2011 - 02:02 PM

Considering you paid $500 for the course, and this is detrimental to your grade I would ask to be paid more than $15 per assignment ;)


Even if I told you your signature is super pretty? Posted Image

#4 Rambo

Rambo
  • 833 posts

Posted 22 June 2011 - 02:11 PM

Even if I told you your signature is super pretty? Posted Image


Even if you told me my signature is super pretty :p

(Oh, and I am gay so the nudes won't work for me ;))

#5 Guest_jcrgirl_*

Guest_jcrgirl_*

Posted 22 June 2011 - 02:18 PM

Even if you told me my signature is super pretty :p

(Oh, and I am gay so the nudes won't work for me ;))


Yes I know
that's why I took a jab at your signature instead of exploiting my anatomic structure Posted Image
Not that I'd even consider it (iargue).

I'm too poor to afford much more Posted Image

#6 Scot

Scot
  • ≡^ᴥ^≡

  • 3,873 posts


Users Awards

Posted 22 June 2011 - 03:34 PM

Pm'd you~

#7 Guest_jcrgirl_*

Guest_jcrgirl_*

Posted 25 June 2011 - 10:14 AM

*kick*
I need someone who knows dynamic arrays and pointers for this homework Posted Image

#8 Melchoire

Melchoire
  • 5,284 posts


Users Awards

Posted 25 June 2011 - 03:34 PM

Dynamic arrays? Well I this was my first assignment. It's a "list" object and you can keep adding new elements to it. Works with 0 memory leaks but I had to follow the proff's public interface so you may want to change it:

#include <iostream>
#include <string.h>

using namespace std;

template <class T> class list
{
	public:
		list();
		~list();
		int size();
		void add(const T item);
		T remove(const T item);
		T get(const T item);
		bool contains(const T item);
		void removeAll();
		void print();
	private:
		T* data;
		int list_size;
};

//constructor
template <class T>
list<T>::list()
{
	T* data = new T[0];
	list_size = 0;
}

//destructor
template <class T>
list<T>::~list()
{
	//can't call delete on an empty list otherwise it will be an invalid pointer
	if(list_size != 0)
		delete [] data;
}

//+size() returns int
template <class T>
int list<T>::size()
{
	return list_size;
}

//+print() returns void
template <class T>
void list<T>::print()
{
	for(int i = 0; i <= list_size - 1; i++)
	{
		cout << data[i] << endl;
	}
}

//+add(T: item) returns void
template <class T>
void list<T>::add(const T item)
{
	if(list_size == 0)
	{
		data = new T[1];
		data[0] = item;
		list_size++;
		return;
	}
	
	bool item_found = false;
	for(int i = 0; i <= list_size - 1; i++)
	{
		if(data[i] == item)
		{
			item_found = true;
			break;
		}
	}
	
	try
	{
		if(item_found)
		{
			throw(-1);
		}
	}
	catch(int)
	{
		cerr << "Failed to add " << item << ". Item has already been added" << endl;
		return;
	}
	
	
	T* temp = new T[list_size];
	
	memcpy(temp, data, sizeof(T)*list_size);
	
	delete [] data;
	data = new T[list_size + 1];
	
	memcpy(data, temp, sizeof(T)*list_size);
	data[list_size] = item;
	
	delete [] temp;
	
	list_size++;
}

//+remove(T: item) returns 
template <class T>
T list<T>::remove(const T item)
{
	try
	{
		if(list_size == 0)
		{
			throw(-1);
		}
	}
	catch(int)
	{	
		cerr << "Failed to remove item, list is empty!" << endl;
		return NULL;
	}
	
	bool item_found = false;
	int index;
	for(int i = 0; i <= list_size - 1; i++)
	{
		if(data[i] == item)
		{
			index = i;
			item_found = true;
			break;
		}
	}
	
	if(!item_found)
	{
		return NULL;
	}
	
	int size_b1 = index;
	int size_b2 = list_size - index - 1;
	int* b1 = new int[size_b1];
	int* b2 = new int[size_b2];
	
	memcpy(b1, data, sizeof(T)*size_b1);	
	memcpy(b2, data + index + 1, sizeof(T)*size_b2);
	
	delete [] data;
	data = new T[list_size - 1];
	
	memcpy(data, b1, sizeof(int)*size_b1);
	memcpy(data + size_b1, b2, sizeof(int)*size_b2);
	
	delete [] b1;
	delete [] b2;
	
	list_size--;
	
	return item;
}

//+get(T: item) returns T
template <class T>
T list<T>::get(const T item)
{
	try
	{
		if(list_size == 0)
		{
			throw(-1);
		}
	}
	catch(int)
	{	
		cerr << "Failed to retrieve item, list is empty!" << endl;
		return NULL;
	}
	
	
	for(int i = 0; i <= list_size - 1; i++)
	{
		if(data[i] == item)
		{
			return item;
		}
	}
	
	return NULL;
}

//+removeAll returns void
template <class T>
void list<T>::removeAll()
{
	if (list_size == 0)
	{
		return;
	}
	
	delete [] data;
	data = new T[0];
	list_size = 0;
}

template <class T>
bool list<T>::contains(const T item)
{
	if(list_size != 0)
	{
		for(int i = 0; i <= list_size - 1; i++)
		{
			if(data[i] == item)
			{
				return true;
			}
		}
		
		return false;
	}
}


I also have a linked list and a queue if you want to see those?


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users