homework

How should I program a simulation of a "car" moving along a track?

For Operating Systems class I'm going to write a scheduling simulator entitled "Jurrasic Park". The ultimate goal is for me to have a series of cars following a set path and passengers waiting in line at a set location for those cars to return to so they can be picked up and be taken on the tour. This will be a simple 2d, top-down view ...

Whats the best way to make this Java program?

This the description of the program brief: Produce a software that keeps track of courses taught by lecturers at College. For each course, a course code and title needs to be recorded, as well as a list of lecturers taking that course needs to be recorded. The system should allow courses and lecturers to be added and removed from the...

List top 5(most collected) species from given data?

List top 5 species(spID, common_name, number_collected) found at 'Karkato'(this is a location_name) The following tables are given: species(spID, genus, species, common_name) Field_location(locID, location_name, latitude, type) specimen(mID, spID, locID, date) primary keys are bold foreign keys are italics ...

What is the maximum length of a table name in Oracle?

What is the maximum length of a table name in Oracle? For bonus points, what is the maximum length of a column name? ...

I want to make an button that runs an action with the frequency from an number input in Visual Basic. How do I do it?

I want to make an button that runs an action with the frequency from an number input in Visual Basic .NET . How do I do it? Could someone point me out the syntax of such an action? @Jon, I think that's C++, I am talking about VB.Net. @Adam Davis, VB.Net 3.5 and all that I want to do is use an number from "NumericUpDown" to give a butto...

How do you change the filename extension stored in a string in c++?

Alright here's the deal, I'm taking an intro to c++ class at my university and am having trouble figuring out how to change the extension of a file. First, what we are suppose to do is read in a .txt file and count words, sentences, vowels etc. Well I got this but the next step is what's troubling me. We are then suppose to create a new ...

How to mock Controller.User using moq

Hi there, I have a couple of ActionMethods that queries the Controller.User for its role like this Boolean isAdmin = User.IsInRole("admin"); acting conveniently on that condition. I'm starting to make tests for these methods with code like this [TestMethod] public void HomeController_Index_Should_Return_Non_Null_ViewP...

Can you help me with Enumeration & Array Indexers?

I'm working on this homework project and having trouble understanding the text explaining how to correctly take the accessed value of the enumeration and then apply the string array value to it. Can you please help me understand this? The text we are using is very difficult and poorly written for a beginner to understand, so I'm kind of ...

how to express {2n+3m+1|n,m∈N} in list comprehension form? ( N is the set of natraul number including 0)

How do I express {2n+3m+1|n,m∈N} in list comprehension form? N is the set of natural numbers, including 0. ...

Efficient way of storing Huffman tree

I am writing a Huffman encoding/decoding tool and am looking for an efficient way to store the Huffman tree that is created to store inside of the output file. Currently there are two different versions I am implementing. This one reads the entire file into memory character by character and builds a frequency table for the whole docum...

Multiple animated JPanels - only last one added to JFrame is displaying?

Hi, I am making a multithreaded pacman game. There is a PacmanController class which extends JFrame, a Maze class which extends JPanel, a Pacman class which runs in its own thread and extends JPanel, and a Ghost class which runs in its own thread and extends JPanel. Each thread (pacman and each Ghost) continuously repaints itself and ...

Trimming a string in Python

I need to write a function in python that gets a string- If the first or last characters in the string are spaces, then they should be removed (both). If not than nothing should be done. " Hello " ----> "Hello" " Hello" -----> "Hello" "Hello " -----> "Hello" "Bob has a cat" ----> "Bob has a cat" (none of the spaces in the middle are...

Advice for final year CS project.

I'm in the final year of university education. Soon I'll have to start writing my bachelor dissertation, but I have no idea what software I should write for it. The ideal would be a C++ multi-threaded cross-platform (windows, linux) computer graphics related program. It's also very important to pick project I'll be able to complete - fa...

Is my MIPS program correct?

Write a MIPS program that generates and adds up all even numbers from 1 to 100. it must have at least one loop it should store the sum in register R12 And this is what I wrote: main: li $t0, 0 # clear register $t0 to zero li $t4, 0 # clear register $t4 to zero loop: add $t0, $t...

Pointer Issues 2 [Valid C++ Syntax]

This version is working. I've made // comments throughout my code to better illustrate what I am having trouble with. The program is dependent on reading a text file. In the format of paragraphs with punctuation included. One could copy this and the above into a text file and run the program. // Word.cpp #define _CRT_SECURE_NO_WARNING...

[JAVA] how to send multiple data in 1 single UDP datagram?

hi all, i'm working on a network programming assignment about writing a simple IM system (pretty much like the simplest version of windows messenger). the spec specifies that i must send over 4 fields of data in a single datagram packet, those are: To From Type Message where type refers to message type, implemented as a user defined enu...

Char shifting in C

Greetings I am trying to find the function in the library that shifts chars back and forward as I want for instance: if this function consumes 'a' and a number to shift forward 3 , it will be shifted 3 times and the output will be 'd'. if it this function consumes '5' and a number to shift forward 3 , it will be shifted 3 times and th...

Examples of outdated software development tools and techologies

I'm writing a paper on software process improvement. As i lack experience from actual software development companies, i made up a company that I'll use for the paper. However I need some examples on outdated tools and technologies they could use so that i have something to improve. I was thinking of CVS as the revision control system (...

create and edit view table?

How to create a view with the name "changedata" to see the full name of all employees, salary, department name and the name of the region and allows edit of data from the table s_emp view? create view change as SELECT a.last_name||','||a.first_name as "Nombre", a.salary as "Salary", b.name"Department", c.name as "Region...

Help me out on SEGMENTS of Instructions( MC68000) programming

Please can someone explain to me how i can write a short segments of instructions to move the most significant byte in register D7 to the memory location $8000. this is how i understand it, but i m not sure i am doing it write...please can you help me correct it... Lets assume that D1= 31; BTST D1, D7; MOVE.W SR, ($8000) ...