JustAnswer > Programming
Ask A Question|Register|Login|Help
JustAnswer

Programming

Ask a Programming Question, Get an Answer ASAP!

Have your own Programming question?

8 Programmers are Online Now
characters left:
Not a Programming Question?

Related Programming Topics:

  • Run
  • ,
  • Set
  • ,
  • Top
  • ,
  • Two
  • ,
  • Back
  • ,
  • Code
  • ,
  • File
  • ,
  • Html
  • ,
  • Line
  • ,
  • Stop
Bookmark and Share

Question

1. Write a program to model this temperature distribution for a grid with six rows and eight columns.
a. Read in an initial temperature distribution from a file named initialtemps.txt. The format of the file is 6 rows of 8 numbers. Use one 2 dimensional array to store the temperatures.
b. Allow the user to modify the initial distribution, after it is read, by specifying new values for the points on the four sides of the grid (top, left, right, and bottom as shown above).
c. Compute the final temperature distribution by updating the temperatures at each point, moving across the rows until the temperature differences for all the updates are less than a tolerance value that the user is prompted to enter. When a point is updated, its new value should be used to update the next point. Print the final temperature distribution to the screen, with a descriptive header to include the number of iterations (updates of the entire grid) that were required to converge to the final distribution, in a 6 by 8 matrix format. Also, write the final distribution to a file named finaltemps.txt in the same matrix format, but with no other text, so that this file could be read back into the program if that was desired. Run this case for 3 values of tolerance that differ by at least one order of magnitude. Note the change in the number of iterations required for convergence as the tolerance values change and note these results in the header information documenting your program.
2. Modify the program from part 1 so that the updates are performed by marching down each column, one by one, instead of marching across each row.
3. Modify the program in part 1 so that two arrays are used and so that the program can perform the updates as if they all happen at the same time. Thus, all temperatures are updated using one set of array values. The two arrays are need so that all the old temperatures are available to compute the each new array. Compare the number of iterations required (for the same tolerance value) with the number required for convergence using the part 1 program, and note this comparison in the header documentation for part 3.
Programming Requirements:
1. In general, you should use functions as much as makes sense in a well structured program. In particular, you must use functions to read the initial distribution from the file; to print the distribution to the screen; to write the distribution to the file, and to perform one update of the grid.

Submitted: 184 days and 22 hours ago.
Category: Programming
Value: $65
Status: CLOSED
+
Read More

Optional Information

OS: Windows XP; Browser: IE

Already Tried:
I have tried part 1a and cannot get it to even work

184 days and 21 hours ago.

Reply

Relist: I still need help.

Posted by Raj 184 days and 15 hours ago.

Info Request

Is this done or you still need this one??

Edited by Raj on 5/24/2009 at 5:27 AM

182 days and 19 hours ago.

Reply

no I dont need it

172 days and 19 hours ago.

Reply

hey I have another question for you to look at

Posted by Raj 172 days and 15 hours ago.

Info Request

Ok
Post the question......

172 days and 8 hours ago.

Reply

Write a program that processes a sequence of lines of text entered from the keyboard. The program should report a count of the number of words in those lines. Assume that each line is 80 characters or less, and ends with a new line (enter); and that words are delimited by one or more space characters. There may be punctuation (periods and commas) which should be ignored, but there will be no hyphenated words crossing end of lines. Your program should prompt the user to enter another line of text, or to stop. Use functions to solve.

Modify the program to prompt the user to enter a target word, and report the number of occurrences of the target word.

Modify the program to count the number of words containing one letter, two letters, three letters, and so on, up to twelve letters. Any words with more than twelve characters should be grouped together in one category, greater than twelve characters.

Posted by Raj 172 days and 4 hours ago.

Info Request

When do you need the program?
and do you need this in C++?

Posted by Raj 172 days and 4 hours ago.

Info Request

When do you need the program?
and do you need this in C++?

172 days and 1 hours ago.

Reply


32 hours

Posted by Raj 171 days and 10 hours ago.

Info Request

Ok i will try my best to do this in the specified time range.....
I think from now i am left with 12 hrs......

171 days and 3 hours ago.

Reply


Ok would you like me to ask someone else

171 days and 3 hours ago.

Reply


I will post what I have done so far I'm on my way home from work any then I will post it

171 days and 3 hours ago.

Reply

here is what I have so far I uploaded it at rapid share and it is in c I didn't see your comment earlier.
http://rapidshare.com/files/241566778/lab8_8.c.html

Posted by Raj 171 days and 2 hours ago.

Info Request

So you need it in C
I thought you needed it in C++

171 days and 2 hours ago.

Reply


Yes it is in c

Posted by Raj 171 days and 2 hours ago.

Info Request

Ok i will complete the code for you.....It will take some time...
will that be fine with you.....

If possible then please specify me how much time i am left to complete the question?

I will immediately start working on this one.........Earlier i was thiniking of using some string functions...

171 days and 2 hours ago.

Reply


Eight hours if you want just do one of the modify programs that are in the bold letters I greatly appreciate it

Posted by Raj 171 days and 2 hours ago.

Info Request

Ok i will.........Try my best

Accepted Answer

Ok
I am done with the code which implements both the bold parts that you have mentioned:

Please Click here



Edited by Raj on 6/6/2009 at 9:13 PM

Picture
Expert: Raj
Pos. Feedback: 100.0 %
Accepts: 
Answered: 6/6/2009

Computer Software Engineer

BE Computers

+
Read More

Related Programming Questions

  • How do I insert a budget amount for the whole project in MS
  • I need help with creating HTML code for a Calander or countd...
  • i am doing an assignement on a alice program and i was just
  • 3. Three types of file organization were presented in this
  • 3. Using the information given, calculate I/O access speed
  • "Mike B" Visual Basic 2008 Express Edition: Currency Convert...
  • I have a problom with exporting different quickbook files to
  • I am trying to do a Vlookup type function between two tables



Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Question List | Become an Expert | Terms of Service | Security & Privacy | About Us
© 2003-2009 JustAnswer Corp.