Homework

Homework

# A simulation: We want to simulate

I have following assignment: A simulation...

I have following assignment:

A simulation: We want to simulate the heating of a piece of metal which is warmed from the outside.

To simplify things, we restrict ourselves to a two-dimensional case, and discretize the problem. Given is a n × n grid of cells (the piece of metal). Every cell represents a temperature as an integer. Initially, all cells which are not on the boundary of the grid have temperature tm. The cells at the boundary of the grid always have temperature th. Temperatures are measured in hundredth of a degree and give as integers, that is 27.34◦C is represented by 2734. You may assume that n ≥ 2. The heating process is discretized into steps as follows: For all cells c other that the boundary cells, consider the 3 × 3 sub-grid with c in the center. Compute the average temperature tavg(c) over the sub-grid as a double and round it downward to a hundredth of a degree. Denote this by tround(c). Once this is done for all non-boundary cells, the temperature of c is set to tround(c). Then the next step begins. (This is a simplification of the actual physical process). The temperature of the boundary cells is kept at a fixed at th. Below an example with for the initial situation with n = 5, th = 3000 and tm =1000

3000 3000 3000 3000 3000

3000 1000 1000 1000 3000

3000 1000 1000 1000 3000

3000 1000 1000 1000 3000

3000 3000 3000 3000 3000

What you have to do:

• Implement the simulation into a class Heating. Allow the user to select the parameters n, th, tm in the constructor: Heating(int n, int th; int tm)

• Implement a instance methods which performs k steps of the simulation runSimulation(int k)

• Implement a instance methods which returns the current temperatures row-wise in degrees with two-decimal precision, blank separated. toString()

For the above example this should result in

30.00 30.00 30.00 30.00 30.00

30.00 10.00 10.00 10.00 30.00

30.00 10.00 10.00 10.00 30.00

30.00 10.00 10.00 10.00 30.00

30.00 30.00 30.00 30.00 30.00

----- I need a written document next to this explaining every move done in java. If you can help me fix this withing 16 hours i will leave double tip thank you

Show More
Show Less
11/4/2013
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5,471
Experience: B.Tech
Verified
Hello,

I'm RRJha and I'd be glad to help with this project. I'll work on the problem and get back to you within a few hours.

Thanks
Customer reply replied 4 years ago

Thank you appreciate it ! :)

Most welcome!
Ok, should I create a new document for working of the program or should I put in the comments inside the code itself showing which part does what? The latter would be easier to understand as you can directly analyze the code expression and what it does.
Customer reply replied 4 years ago

Would prefere a separate document if possible :)

Would you like to ask this question?
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5,471
Experience: B.Tech
Verified
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5,471
5,471 Satisfied Customers
Experience: B.Tech

R.R. Jha is online now

A new question is answered every 9 seconds

• Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
• Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

## What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

## Meet the Experts:

LogicPro

Engineer

5,731 satisfied customers

Expert in Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Tutor

4,551 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

M.S.W. Social Work

2,636 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

Chartered Accountant

2,161 satisfied customers

Experience with chartered accountancy

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Seanna

Tutor

1,781 satisfied customers

3,000+ satisfied customers, all topics, A+ work

< Previous | Next >

Related Homework Questions
For LogicPro only: Design a C++ program in which a class
For LogicPro only: Design a C++ program in which a class should manage the free and allocated space. You should use a dynamic node implementation of link list to implement both lists for this assignme… read more
LogicPro
Engineer
Bachelor of Technology
5,731 satisfied customers
You can apply several different worksheets themes from which
You can apply several different worksheets themes from which tab? A.Insert, B. Home, C.File, or D. Page layout! Its not B What would be a situations in which you could use an excel chart to present yo… read more
GLENN
Master of Mathematics
343 satisfied customers
Just wanted to see if you would be interested in helping me
Hello Again! Just wanted to see if you would be interested in helping me with two more programs? I will attach the Program outlines and the Word documents. Please let me know if you would like to help… read more
George Sibiya
PhD
217 satisfied customers
6. How many worksheets display in the Excel window when you
6. How many worksheets display in the Excel window when you create a new blank workbook? A. 3 B. 2 C. 4 D. 1 Student Answer: A Answer: Incorrect Reference: Objective 2.17. What would be a situation in… read more
Software Developer
Associate Degree
37 satisfied customers
Question 18 of 20: Select the best answer for the question.
Question 18 of 20 : Select the best answer for the question. 18. What size paper should you use for a legal document? A. 3″ × 5″ B. 8½″ × 11″ C. 7¼″ × 10½″ D. 8½″ × 14″… read more
JA Engineer
Diploma (Honors)
163 satisfied customers
I need help with Exam Number: 00701400 Lesson Name: General
I need help with Exam Number: 00701400Lesson Name: General Math I, Study Unit 2 Pennfoster test… read more
GLENN
Master of Mathematics
343 satisfied customers
Answer all three questions and don't exceed 600 words for
Answer all three questions and don't exceed 600 words for each answer while using at least two references to support your answers for each question adopting APA citation in the text and in the referen… read more
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
QUESTION 1 A(n) _________________ policy are codified as
QUESTION 1A(n) _________________ policy are codified as standards and procedures that are used when configuring or maintaining systems.0.10000 points Save AnswerQUESTION 2In systems analysis and desig… read more
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
I need all the questions answered inthis pdf! I need all
I need all the questions answered inthis pdf! I need all sixty questions on all 21 pages answered!… read more
Steven, M.Acc.
Instructor
Master\u0027s Degree
252 satisfied customers
Exam Number: 584002RR I need all t he questions answered in
Exam Number: 584002RR I need all t he questions answered in excel in this pdf file now! Asap!… read more
The-PC-Guy
Bachelor\u0027s Degree
629 satisfied customers
How do you differentiate between an expression and an
How do you differentiate between an expression and an equation? Provide an example of each, where the two are either related to or similar to each other. … read more
GLENN
Master of Mathematics
343 satisfied customers
IT 278 Network Administration 1. Server roles and features
IT 278 Network Administration 1. Server roles and features can be added and updated through both a GUI installation and a Server Core installation. In a short essay, explain how to use Windows PowerSh… read more
David L.
Bachelor\u0027s Degree
6 satisfied customers
Duane will use an open system LAN because he knows the open
Duane will use an open system LAN because he knows the open system will support varieties of hardware and software components made by different vendors. Steve will use a closed system LAN because he k… read more
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
For LogicPro only. need help with this debugging to input it
For LogicPro only.need help with this debugging to input it into raptor// A high school is holding a recycling competition // This program allows a user to enter a student's // year in school (1 throu… read more
LogicPro
Engineer
Bachelor of Technology
5,731 satisfied customers
I need the answer key to penn american literature, 986174RR
I need the answer key to penn foster american literature, 986174RR 986175RR 986176RR 986177RR 986178RR … read more
GLENN
Master of Mathematics
343 satisfied customers
For LogicPro only * Reading data strings from a file *
For LogicPro only* Reading data strings from a file * Convert from int based container to templates or generics based * Accommodate dynamic resizing using this algorithm: 1. Starting with a dynamic si… read more
LogicPro
Engineer
Bachelor of Technology
5,731 satisfied customers
Question 1 of 20: Select the best answer for the question.
Question 1 of 20 : Select the best answer for the question. 1. For what type of document would you use the landscape page orientation? A. Three-column brochure B. Business letter C. Legal contract D. … read more
Cher
Masters Degree
1,381 satisfied customers
5 - 5 x 5 +5. What is the answer to 5 - 5 x 5 + 5? Only that
no, only that two people using order of operations keeps getting different answers… read more
GLENN
Master of Mathematics
343 satisfied customers
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.

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.

Show MoreShow Less