homework

OOP design design : Soccer teams

I want to create a FIFA soccer solution in OOP (using C# in my case). For now, I need to represent: Teams, Groups (we have H groups), and Games. What I did is creating those classes: Team - which contains several properties like teamName, score, wins etc... Game - which contains TeamA,TeamB (Both Team objects) and 2 properties TeamAS...

Scheme, When to use Symbols instead of Strings?

I apologize in advance for my primitive english; i will try my best to avoid grammatical errors and such. Two weeks ago i decided to freshen my knowledge of Scheme (and its enlightnings) whilst implementing some math material i got between hands, specifically, Regular Languages from a course on Automata theory and Computation in which ...

How to add 2 ViewControllers to the same window

I am following Stanford's iPhone Development course in iTunes U and I'm having problem with one of their assignments (Paparazzi, if anyone is familiar). What I'm trying to do is basically to create this view as the first 'screen' upon application launch: And this is the code that I have in the app delegate: - (BOOL)application:(UIAp...

C programming - Breaking down of money

I need to break down the amounts on their respective bill/coin. The output is somewhat like this: So far, here is my code: (I made the last few codes a comment one 'cos the errors come from there) { int x,y; printf("Enter input: "); scanf("%d",&x); y=x/1000; printf("\n# of $1000 bill: %d",y); x = x%1000; y=x/500; ...

how to combine switch and if else statements

I'm taking an online java class and the teacher has asked for the following: Write a menu program that ask a user for a number indicating the four basic math equations(addition, subtraction, multiplication, division). Using a if/else structure to do the required operation, ask the user for inputs and solve the equation. I am new to this,...

Matching a^n A^n with regular expression

hi, we're learning about the difference between regular languages and regex, and the teacher explained that the language a^n b^n is not regular, but she said that most regex flavors can match a^n A^n and she gave this problem for our extra credit homework problem. we've been struggling for a couple of days now, and could really us...

Unix - File Creation Date

For an assignment I need to determine the creation time of a random file. As far as I know, Unix does not store the creation time (in contrast to *-BSD). I think I've read somewhere that you should ask for the modification time instead but I don't know where and asking Google doesn't give me a non-ambigious answser either. Any ideas? ...

Creating a webserver in C#

I'd like to create a web server that responds to every incoming request with a simple "Hello" message in C#. How do I do that? ...

I am totally confused this is an online class I have no clue how to do this homework can anyone tutor me

Question is: Write pseudocode for a program that calculates the service charge of a customer owes for writing a bad check. The program accepts a customer's name, the date the check was written (year, month and day), the current date (year, month and day), and the amount of the check in dollars and cents. The progra...

How to implement "Tournament Sort" and "Insertion Sort" in Java?

I have a program I am working on but I am having difficulties to implement Tournament Sort and Insertion Sort in Java. Please if anyone can help. ...

Inductive proof of binary tree child nodes

How can I prove that the number of interval nodes in a binary tree with n leaves (where each interval node has two children) is n-1, using induction? ...

convert input to UpperCase

Ok, I'm working on a simple statement code and it works fine as long as the input matches, ie Upper Case. I found it to.UpperCase and it looks simple enough, but still no dice. my code: public static void main(String[] args) { //public static char toUpperCase(char LG) // If I put this in, it gives me 'illegal start of expression' char...

how to rotate a bitmap image in c++ using MFC?

how to rotate a bitmap image in c++ using MFC? i dont wanna use GDI. is it possible by only changing x and y values in this code? CBitmap img; CDC dc; BITMAP bmp; img.LoadBitmapW(IDB_BITMAP1); img.GetBitmap(&bmp); CDC* pDC = this->GetDC(); dc.CreateCompatibleDC(pDC); CBitmap* pOld = dc.SelectObject(&img...

Pass data between ViewControllers in a UINavigationController

(Continued from this thread) Suppose that I have the following view created: The 'View' button is supposed to push a new ViewController which will show all photos by either Josh or Al, depending on which button is pressed. My question is: In the ViewController code, how do I determine which 'View' button is pushed (top or bottom)? ...

how to expose "Payroll as a Service"

I'm final year student of BE (Comp & Info Sys). My group FYP is Online Payroll System & we want to deliver project "Online Payroll as a Service" (Software as a Service). Kindly guide how to expose services. Regards, Nasir Iqbal ...

Borland Warning 8092

Regarding the following C++ code, LengthAlphabeticalSort lengthAlphabeticalSort; outputList.sort(lengthAlphabeticalSort); // causes borland 8092 error, guaranteed stable_sort. class LengthAlphabeticalSort { public: bool operator() (std::string str1, std::string str2) { if(str1.length() < str2.length()) ...

Pascal's triangle in python

So I'm making a Pascal's triangle and I can't figure out why this code isn't working. It prints out something like this [] [1] [1, 2] [1, 3, 3] [1, 4, 6, 4] [1, 5, 10, 10, 5] [1, 6, 15, 20, 15, 6] [1, 7, 21, 35, 35, 21, 7] [1, 8, 28, 56, 70, 56, 28, 8] [1, 9, 36, 84, 126, 126, 84, 36, 9] Which is almost correct, however it seems that ...

Convert Latitude/Longitude to decimal degree value

I have lat/long value in this format 5,141,456,024 -231,146,115 I want to convert these values in to decimal degree like 51.3758010864258 -2.35989999771118 I have 25K records which I want to convert into decimal degree Thanks ...

Fibonacci - Homework

Hello, I need to to write a Java code that checks whether the user inputed number is in the Fibonacci sequence. I have no issue writing the Ficonacci sequence to output, but (probably because its late at night) I'm struggling to think of the sequence of "whether" it is a fibonacci number. I keep starting over and over again. Its reall...

Calculate Sums with accumulate

procedure accumulate is defined like this: (define (accumulate combiner null-value term a next b) (if (> a b) null-value (combiner (term a) (accumulate combiner null-value term (next a) next b)))) problem 1: x^n ;Solution: recursive without accumulate (define (expon x n) (if (> n 0) (* x (ex...