1181 Assignment #8 Parallel Arrays For this application, you will use parallel arrays to compare grades of a list of students. 1. Rename the form to frmGrades and give the form an appropriate title. 2. Add the following variables as global (class level) variables. String namesString = “Aaron Ben Carmelina Dorthey Erinn Karin ” + “Lester Mitsue Nichol Ria Sherie Zachary”; String assignmentsString = “44 92 100 100 100 97 100 95 100 0 100 100|” + “95 95 97 90 100 95 100 100 100 100 100 75|” + “98 100 65 0 100 100 100 100 100 100 95 75|” + “85 100 0 50 100 95 90 0 80 100 100 100”; 3. Create three global (class level) arrays. a. One will hold all of the names of your students. b. One will be a 2D array to hold each of the grades for each assignment. c. One will hold the calculated grade for each student for all of their assignments. 4. Add a ListBox to the form to display all of the student names and assignment grades in your arrays. 5. Add a button to do the following: a. Fill the name and assignment grades 2D global arrays from these two strings. The arrays will be ran in parallel. i. Remember Split(). b. DataTypes on the arrays must be appropriate. c. After filling the arrays, call a method to fill the ListBox with student names and grades. i. Remember to use a mono-spaced font. 6. Add a button that will calculate the grade of each student: a. A method to calculate the grade for each student will be called from this event to fill the grades array. 7. Add 3 Labels to display the Name, Grade, and Letter grade of a selected student. 8. Add a Button that will fill the three previously mentioned Labels from the name and grade arrays. a. You will need to make sure the code cannot run until all appropriate arrays have been filled. b. You will need to use the arrays to fill the Labels. c. A method to calculate and return the appropriate letter grade for the student will need to be called from this event method. i. Hint: there is a .SelectedIndex property on a ListBox to get which item in a ListBox is selected. 9. Add a four Labels for the average grade of each assignment. 10. Add a button to display the average of each assignment in the four Labels. a. This event method will need to call a method that calculates the average grade of an assignment from a given index relating to the assignment in the assignment array. 11. You will need a method for each of the following: a. Fill the arrays from the strings provided. i. Hint: the .Split() method is on a string. However, you will not be able to use this directly to fill the assignment array. b. Display the names and assignment grades of each students in the ListBox i. Hint: the .PadLeft() and .PadRight() methods are on a string. c. Get an array of student average across all assignments. i. This is calculated by iterating across the appropriate index of the 2D assignment array for each student and calculating the average of the four assignment grades. This array will be ran in parallel with the student names array. d. Display the name, grade, and letter grade for a given index in the labels. e. Letter grade is returned for a given grade (use +/- system) f. Get the average grade of an assignment using the index of that assignment in the assignments array. Structure Chart Scoring 1. 5% – Form contains controls necessary for assignment. 2. 10% – Validation as needed as described in the assignment. a. This can be either pre-checking or hiding of controls. 3. 5% – Proper datatypes used for each array to include 2D and parallel arrays. 4. 10% – Method used that correctly fills arrays from strings provided. 5. 10% – Method used that displays all students and grades in ListBox. 6. 10% – Method used to return grades for each student based on assignment grades. 7. 10% – Method used to correctly fill name, grade and letter grade to the form using parallel arrays. 8. 5% – Method used that returns the correct letter grade using +/- system. 9. 10% – Method used that returns the correct average of the grades from a given assignment index. 10. 5% – Parallel arrays use indexes correctly. 11. 15% – Meaningful comments; Correct formatting (indentation, braces, whitespace, etc). This should be done automatically if you set up your preferences correctly as described at the beginning of this document. a. Form, TextBoxes, and Buttons are named properly. b. Form and controls have proper titles and labels. 12. 5% – Wow Factor: do something more to the assignment that shows creativity. (Make sure to document it and that it works.) ButtonAverages_Click getAssgnAverageGrade fillArrays displayNames ButtonShow_Click assgnIndex showStudentDetails ButtonSelected_Click selectedIndex getLetterGrade gradeAvg letterGrade Letter Grade Range A 93 – 100 A – 90 – 92.9 B + 87 – 89.9 B 83 – 86.9 B – 80 – 82.9 C + 77 – 79.9 C 73 – 76.9 C – 70 – 72.9 D + 67 – 69.9 D 63 – 66.9 D – 60 – 62.9 F < 60 avgGrade ButtonGrades_Click getStudentGrades studGrades

1181 Assignment #8 Parallel Arrays For this application, you will use parallel arrays to compare grades of a list of students. 1. Rename the form to frmGrades and give the form an appropriate title. 2. Add the following variables as global (class level) variables. String namesString = “Aaron Ben Carmelina Dorthey Erinn Karin ” + “Lester Mitsue Nichol Ria Sherie Zachary”; String assignmentsString = “44 92 100 100 100 97 100 95 100 0 100 100|” + “95 95 97 90 100 95 100 100 100 100 100 75|” + “98 100 65 0 100 100 100 100 100 100 95 75|” + “85 100 0 50 100 95 90 0 80 100 100 100”; 3. Create three global (class level) arrays. a. One will hold all of the names of your students. b. One will be a 2D array to hold each of the grades for each assignment. c. One will hold the calculated grade for each student for all of their assignments. 4. Add a ListBox to the form to display all of the student names and assignment grades in your arrays. 5. Add a button to do the following: a. Fill the name and assignment grades 2D global arrays from these two strings. The arrays will be ran in parallel. i. Remember Split(). b. DataTypes on the arrays must be appropriate. c. After filling the arrays, call a method to fill the ListBox with student names and grades. i. Remember to use a mono-spaced font. 6. Add a button that will calculate the grade of each student: a. A method to calculate the grade for each student will be called from this event to fill the grades array. 7. Add 3 Labels to display the Name, Grade, and Letter grade of a selected student. 8. Add a Button that will fill the three previously mentioned Labels from the name and grade arrays. a. You will need to make sure the code cannot run until all appropriate arrays have been filled. b. You will need to use the arrays to fill the Labels. c. A method to calculate and return the appropriate letter grade for the student will need to be called from this event method. i. Hint: there is a .SelectedIndex property on a ListBox to get which item in a ListBox is selected. 9. Add a four Labels for the average grade of each assignment. 10. Add a button to display the average of each assignment in the four Labels. a. This event method will need to call a method that calculates the average grade of an assignment from a given index relating to the assignment in the assignment array. 11. You will need a method for each of the following: a. Fill the arrays from the strings provided. i. Hint: the .Split() method is on a string. However, you will not be able to use this directly to fill the assignment array. b. Display the names and assignment grades of each students in the ListBox i. Hint: the .PadLeft() and .PadRight() methods are on a string. c. Get an array of student average across all assignments. i. This is calculated by iterating across the appropriate index of the 2D assignment array for each student and calculating the average of the four assignment grades. This array will be ran in parallel with the student names array. d. Display the name, grade, and letter grade for a given index in the labels. e. Letter grade is returned for a given grade (use +/- system) f. Get the average grade of an assignment using the index of that assignment in the assignments array. Structure Chart Scoring 1. 5% – Form contains controls necessary for assignment. 2. 10% – Validation as needed as described in the assignment. a. This can be either pre-checking or hiding of controls. 3. 5% – Proper datatypes used for each array to include 2D and parallel arrays. 4. 10% – Method used that correctly fills arrays from strings provided. 5. 10% – Method used that displays all students and grades in ListBox. 6. 10% – Method used to return grades for each student based on assignment grades. 7. 10% – Method used to correctly fill name, grade and letter grade to the form using parallel arrays. 8. 5% – Method used that returns the correct letter grade using +/- system. 9. 10% – Method used that returns the correct average of the grades from a given assignment index. 10. 5% – Parallel arrays use indexes correctly. 11. 15% – Meaningful comments; Correct formatting (indentation, braces, whitespace, etc). This should be done automatically if you set up your preferences correctly as described at the beginning of this document. a. Form, TextBoxes, and Buttons are named properly. b. Form and controls have proper titles and labels. 12. 5% – Wow Factor: do something more to the assignment that shows creativity. (Make sure to document it and that it works.) ButtonAverages_Click getAssgnAverageGrade fillArrays displayNames ButtonShow_Click assgnIndex showStudentDetails ButtonSelected_Click selectedIndex getLetterGrade gradeAvg letterGrade Letter Grade Range A 93 – 100 A – 90 – 92.9 B + 87 – 89.9 B 83 – 86.9 B – 80 – 82.9 C + 77 – 79.9 C 73 – 76.9 C – 70 – 72.9 D + 67 – 69.9 D 63 – 66.9 D – 60 – 62.9 F < 60 avgGrade ButtonGrades_Click getStudentGrades studGrades

checkyourstudy.com Whatsapp +919911743277
Project 2: due date is April 5th , 2017 before class time The objective of this project is to use ARM assembly to branch to functions and pass the argument to the functions using the stack and either receive the result on the stack or in a register. 1. Write your project in pseudocode. 2. Place the following integers into an input file. Use them as an inputs for running operations: 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 3. Have 2 output files. The first one must have three columns: the first is the integer, the second is the summation (using the algorithm n/2 *(n+1)), and the third column is the factorial of the number. Prior to column headings there should be string(s) of character that lists your class name, number, and your name and last name. The second output file is described in part 4. 4. Use the following functions in this problem: • File open • File append • Number factorial • Number summation For each integer, save the results of factorial and summation in a memory array contiguously. For example, the array would read: A = …, (n-1)!, Σ𝑖𝑛−1𝑖=0, n!, Σ𝑖𝑛𝑖=0,… After processing all the integers, perform an insertion sort on the resultant array. You can find its explanation on the internet. The example below is from Wikipedia: for i = 1 to length (A) -1 x = A[i] j = i – 1 While j >= 0 and A[j] > x A[j + 1] = A[j] j = j – 1 end while A[j + 1] = x End for loop Note: A is the array of integer values calculated by your summation and factorial functions. Write the calculated integer values from the sorted array to the second output file. The integers must be sorted in an ascending order. Note: 1. Each subroutine/function must have comment block in the beginning which explains which variables are the inputs that are received from caller and where they are located, and what is (are) the function’s output(s), where it is located, and how its returned to the caller. 2. Utilize the stack for passing parameters.

Project 2: due date is April 5th , 2017 before class time The objective of this project is to use ARM assembly to branch to functions and pass the argument to the functions using the stack and either receive the result on the stack or in a register. 1. Write your project in pseudocode. 2. Place the following integers into an input file. Use them as an inputs for running operations: 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 3. Have 2 output files. The first one must have three columns: the first is the integer, the second is the summation (using the algorithm n/2 *(n+1)), and the third column is the factorial of the number. Prior to column headings there should be string(s) of character that lists your class name, number, and your name and last name. The second output file is described in part 4. 4. Use the following functions in this problem: • File open • File append • Number factorial • Number summation For each integer, save the results of factorial and summation in a memory array contiguously. For example, the array would read: A = …, (n-1)!, Σ𝑖𝑛−1𝑖=0, n!, Σ𝑖𝑛𝑖=0,… After processing all the integers, perform an insertion sort on the resultant array. You can find its explanation on the internet. The example below is from Wikipedia: for i = 1 to length (A) -1 x = A[i] j = i – 1 While j >= 0 and A[j] > x A[j + 1] = A[j] j = j – 1 end while A[j + 1] = x End for loop Note: A is the array of integer values calculated by your summation and factorial functions. Write the calculated integer values from the sorted array to the second output file. The integers must be sorted in an ascending order. Note: 1. Each subroutine/function must have comment block in the beginning which explains which variables are the inputs that are received from caller and where they are located, and what is (are) the function’s output(s), where it is located, and how its returned to the caller. 2. Utilize the stack for passing parameters.

checkyourstudy.com Whatsapp +919911743277
MATH 248 SPRING 2017 – LABORATORY ASSIGNMENT 6 – Sochacki DUE: Wednesday April 12, 2017 POINTS: 50 You are to write a Matlab script that will determine approximations to the first and second derivatives for the solution to the initial value ordinary differential equation (IVODE) problem ‘()*(); (0)xtaxtbxα=−= at a given t. You should ask the user for the numbers ,,,abtα and other parameters needed to approximate the first and second derivative. Guidelines: (1) First you should do a neat one-three page (8.5 x 11) write up showing properties of the solution to this system. You should sketch what solutions to this equation look like. These sketches should be accurate. Since you can solve this equation exactly, you should give the error bounds for your approximations to the derivatives. (2) Your program should print the approximations with labels indicating what the output represents. (3) You should make sure your code minimizes calculation and errors. (4) Since you know the exact answer, you should have your code output the absolute error for your approximations. (5) Give a plot of your numerical solution to this IVODE for the parameters I give you.

MATH 248 SPRING 2017 – LABORATORY ASSIGNMENT 6 – Sochacki DUE: Wednesday April 12, 2017 POINTS: 50 You are to write a Matlab script that will determine approximations to the first and second derivatives for the solution to the initial value ordinary differential equation (IVODE) problem ‘()*(); (0)xtaxtbxα=−= at a given t. You should ask the user for the numbers ,,,abtα and other parameters needed to approximate the first and second derivative. Guidelines: (1) First you should do a neat one-three page (8.5 x 11) write up showing properties of the solution to this system. You should sketch what solutions to this equation look like. These sketches should be accurate. Since you can solve this equation exactly, you should give the error bounds for your approximations to the derivatives. (2) Your program should print the approximations with labels indicating what the output represents. (3) You should make sure your code minimizes calculation and errors. (4) Since you know the exact answer, you should have your code output the absolute error for your approximations. (5) Give a plot of your numerical solution to this IVODE for the parameters I give you.

checkyourstudy.com Whatsapp +919911743277
How the Earth Works Geo 1095 Lab 8 Running Water Part 2 Rivers and Streams Lab Begin this lab by reading sections 13.4 -13.8 in your textbook. You will have two options to choose from to complete this lab. You do not have to do both options, just choose one that will work best for you. Submit your work as a word document in canvas. Option 1- Field Trip to a Stream Find a stream/river that is located close to you and make two stops, one different spot that is upstream and one different spot that is downstream. Answer the following questions for each location. In the end, you will have two sets of questions total. Submit your word document through canvas. Include the following: Site A: (Name of stream and location) 1. What type of alluvial channel is the stream? 2. What different loads is the stream carrying? 3. Does the stream currently have laminar flow or turbulent flow? 4. What type of valley is the stream running through? 5. What features does the stream express? (cut banks, point bars, meanders, gravel bars, islands, etc.) 6. Describe the sediments, are they sorted, and are they rounded? 7. What kind of minerals do you see? 8. What kind of rocks do you see? 9. What does the sorting tell about the energy level of the stream? 10. What does rounding tell you about how far those sediments have traveled? 11. Where might have the rocks originated from? (their provenance) 12. Provide pictures of location Site B: (Name of stream and location) 1. What type of alluvial channel is the stream? 2. What different loads is the stream carrying? 3. Does the stream currently have laminar flow or turbulent flow? 4. What type of valley is the stream running through? 5. What features does the stream express? (cut banks, point bars, meanders, gravel bars, islands, etc.) 6. Describe the sediments, are they sorted, and are they rounded? 7. What kind of minerals do you see? 8. What kind of rocks do you see? 9. What does the sorting tell about the energy level of the stream? 10. What does rounding tell you about how far those sediments have traveled? 11. Where might have the rocks originated from? (their provenance) 12. Provide pictures of location Write a very short summary describing the differences OR similarities in the two locations. Option 2 –Build your own Stream Table For this lab, you will get to construct your own stream table with commonly found items around the house. If you do need to go pick up some supplies, keep it low budget, it does not need to be fancy. If you have a better method that works well let me know! If you get stuck do a google image search for DIY stream tables and you will see some tables along the lines of what you want to create. Part 1: Assembly Items you will need to make your stream table  One of the following; a plastic bin, tray with high sides, long foil casserole pan, or 13×9 Pyrex dish  1lb of sand (poorly sorted sand is great!)  A handful of natural clay or mud  Small pebbles (optional)  Ruler or painters stick  Cup  Kitchen sink  Wooden block or 3 ring binder Method 1 (super cheap)  A friend who will slowly and steadily pour water from a pitcher into the dish Method 2 (still pretty cheap if you have the stuff)  plastic tubing  empty clean plastic milk jug with cap  duct tape or hot glue Take the cap off of the plastic milk jug and cut a hole big enough for the piping to fit through in the cap. Hot glue or duct tape the cap to create a water tight seal between the cap and the piping. Cut a hole in one side of the plastic milk jug, big enough to pour water to refill jug. Put the cap on tight and fill the jug with water from the side hole. Keep the jug on its side. Use gravity to throttle the water pressure coming out of the tube. (Put the jug just above the level of the sand for a gentle stream, or have the jug far above the level of the sand for a torrent of water) Method 3 (semi fancy)  A pump  Bucket  Plastic tubing that fits the pump  Spring clamp  Duct tape Connect the tubing to the pump and place the pump in a bucket of water. Use the spring clamp to throttle the amount of water coming out of the plastic tubing by partially clamping the plastic tubing. Use the same spring clamp or duct tape to connect the tubing to the “headwaters” of the container. If you want to get super fancy, cut a hole in the lower middle side of the container and hot glue a piece of tubing into the hole. Place the tubing in the bucket with the pump for a closed water system. Assemble your stream table 1. Mix the clay/mud, and sand with a little water to make sand castle consistency sand. Place in container. 2. Take your ruler or painters stick and squeegee the sand into one side of the container and level the top of the sand. Remove ruler or stick. 3. Place the container near the sink or outside so that if it accidentally overflows you don’t have a mess. 4. Create a gradient for your stream, place a wooden block or 3 ring binder on the end of the stream table that has all the sand. You can lower or raise the stream table to get different results and different streams 5. Have a cup ready at the bottom to scoop out excess water 6. Optional tape the plastic tubing to the “headwaters” of your container 7. Use method 1, 2, or 3 to add water to your stream table 8. Let the fun begin Part 2: Fun with stream tables and assignment 1. Play with the stream table to try to recreate different types of streams and lakes, observe cut banks and point bars, where the current is strongest, what is suspended in the stream, delta patterns you might see, etc. Tip: 2. When the sand gets too far to the bottom use the painters stick or ruler to push the sand to the higher end of the container. 3. Write a short summary about what you were able to observe with your stream table. Include the following concepts:  base level  head waters  mouth  deltas  type of streams  stream features (point bar and cut bank meanders)  pictures of your stream table

How the Earth Works Geo 1095 Lab 8 Running Water Part 2 Rivers and Streams Lab Begin this lab by reading sections 13.4 -13.8 in your textbook. You will have two options to choose from to complete this lab. You do not have to do both options, just choose one that will work best for you. Submit your work as a word document in canvas. Option 1- Field Trip to a Stream Find a stream/river that is located close to you and make two stops, one different spot that is upstream and one different spot that is downstream. Answer the following questions for each location. In the end, you will have two sets of questions total. Submit your word document through canvas. Include the following: Site A: (Name of stream and location) 1. What type of alluvial channel is the stream? 2. What different loads is the stream carrying? 3. Does the stream currently have laminar flow or turbulent flow? 4. What type of valley is the stream running through? 5. What features does the stream express? (cut banks, point bars, meanders, gravel bars, islands, etc.) 6. Describe the sediments, are they sorted, and are they rounded? 7. What kind of minerals do you see? 8. What kind of rocks do you see? 9. What does the sorting tell about the energy level of the stream? 10. What does rounding tell you about how far those sediments have traveled? 11. Where might have the rocks originated from? (their provenance) 12. Provide pictures of location Site B: (Name of stream and location) 1. What type of alluvial channel is the stream? 2. What different loads is the stream carrying? 3. Does the stream currently have laminar flow or turbulent flow? 4. What type of valley is the stream running through? 5. What features does the stream express? (cut banks, point bars, meanders, gravel bars, islands, etc.) 6. Describe the sediments, are they sorted, and are they rounded? 7. What kind of minerals do you see? 8. What kind of rocks do you see? 9. What does the sorting tell about the energy level of the stream? 10. What does rounding tell you about how far those sediments have traveled? 11. Where might have the rocks originated from? (their provenance) 12. Provide pictures of location Write a very short summary describing the differences OR similarities in the two locations. Option 2 –Build your own Stream Table For this lab, you will get to construct your own stream table with commonly found items around the house. If you do need to go pick up some supplies, keep it low budget, it does not need to be fancy. If you have a better method that works well let me know! If you get stuck do a google image search for DIY stream tables and you will see some tables along the lines of what you want to create. Part 1: Assembly Items you will need to make your stream table  One of the following; a plastic bin, tray with high sides, long foil casserole pan, or 13×9 Pyrex dish  1lb of sand (poorly sorted sand is great!)  A handful of natural clay or mud  Small pebbles (optional)  Ruler or painters stick  Cup  Kitchen sink  Wooden block or 3 ring binder Method 1 (super cheap)  A friend who will slowly and steadily pour water from a pitcher into the dish Method 2 (still pretty cheap if you have the stuff)  plastic tubing  empty clean plastic milk jug with cap  duct tape or hot glue Take the cap off of the plastic milk jug and cut a hole big enough for the piping to fit through in the cap. Hot glue or duct tape the cap to create a water tight seal between the cap and the piping. Cut a hole in one side of the plastic milk jug, big enough to pour water to refill jug. Put the cap on tight and fill the jug with water from the side hole. Keep the jug on its side. Use gravity to throttle the water pressure coming out of the tube. (Put the jug just above the level of the sand for a gentle stream, or have the jug far above the level of the sand for a torrent of water) Method 3 (semi fancy)  A pump  Bucket  Plastic tubing that fits the pump  Spring clamp  Duct tape Connect the tubing to the pump and place the pump in a bucket of water. Use the spring clamp to throttle the amount of water coming out of the plastic tubing by partially clamping the plastic tubing. Use the same spring clamp or duct tape to connect the tubing to the “headwaters” of the container. If you want to get super fancy, cut a hole in the lower middle side of the container and hot glue a piece of tubing into the hole. Place the tubing in the bucket with the pump for a closed water system. Assemble your stream table 1. Mix the clay/mud, and sand with a little water to make sand castle consistency sand. Place in container. 2. Take your ruler or painters stick and squeegee the sand into one side of the container and level the top of the sand. Remove ruler or stick. 3. Place the container near the sink or outside so that if it accidentally overflows you don’t have a mess. 4. Create a gradient for your stream, place a wooden block or 3 ring binder on the end of the stream table that has all the sand. You can lower or raise the stream table to get different results and different streams 5. Have a cup ready at the bottom to scoop out excess water 6. Optional tape the plastic tubing to the “headwaters” of your container 7. Use method 1, 2, or 3 to add water to your stream table 8. Let the fun begin Part 2: Fun with stream tables and assignment 1. Play with the stream table to try to recreate different types of streams and lakes, observe cut banks and point bars, where the current is strongest, what is suspended in the stream, delta patterns you might see, etc. Tip: 2. When the sand gets too far to the bottom use the painters stick or ruler to push the sand to the higher end of the container. 3. Write a short summary about what you were able to observe with your stream table. Include the following concepts:  base level  head waters  mouth  deltas  type of streams  stream features (point bar and cut bank meanders)  pictures of your stream table

checkyourstudy.com Whatsapp +919911743277
1 CS174 Group Project-2 Pizza Order Processing (120 points) Project description: In this project, you are asked to write a program for a Pizza store to process pizza orders. Each pizza order includes the following information: (1) name of the customer, (2) number of pizzas, (3) size of each pizza, (4) topping of each pizza, and (5) distance for delivery. The charge information on an order is as follows:  There are 3 sizes of pizza: small, medium and large. Basic price of a pizza is: small – $5.99, medium – $8.99, and large – $11.99.  There are 6 toppings: cheese, pepperoni, sausage, onion, green pepper, and mushroom. No additional charge for cheese topping. For pepperoni topping, the additional charge is $1.5. For sausage topping, the additional charge is $2.5. For onion, green pepper, and mushroom toppings, the additional charge is $1.75 each. Note that the additional charge is the same for different sizes of pizzas.  A 20% off discount is applied to the total charge (before adding delivery fee) when a customer orders more than two large pizza.  If the distance is 0 (i.e. self-pickup), no delivery fee. If it is between 0 and 2 miles, the delivery fee is $2. If it is more than 2 miles, it is $2 plus $0.50 per mile. In order to reduce the complexity of the program, assume customer will order no more than 10 pizzas each time, and each pizza has only one topping. Project requirements: 1. Note: All variables should be defined as local variables (i.e., global variables are not allowed to use except of global constants) in the program. Otherwise, half of the points will be taken away from the following steps. 2. [45 points] Create and define a PizzaOrder class. The class should include: a. [10 points] Attributes (i.e., member variables): (1) order ID, (2) customer name, (3) number of pizzas, (4) sizes of pizzas, (5) topping of each pizza, and (6) distance for delivery. b. [30 points] Activities (i.e.,member functions): (1) constructor(s), (2) getters and setters for each attribute, (3) function for computing the delivery fee, (4) function for computing the topping fee, and (5) function for computing the total charge (including the basic price, topping fee, discount if any, and delivery fee) on a pizza order. 3. [45 points] In the main function: a. [10 points] Prompt the user to input 5 pizza orders, and at the same time to call a function named checkInputValidity, which is defined outside of the main function to check the validity of user inputs. That function should check whether user inputs a wrong size for a pizza in an order (note: there are only three choices for the Pizza size), or wrong topping info. for a pizza in an order (note: there only six choices for Pizza topping), or wrong delivery distance (note: the delivery distance must be between 0 and 10 miles). When an input is invalid, keep prompting the user to re-enter until a valid input is received. 2 b. [10 points] Create an object for each pizza order using an array of objects. c. [10 points] Compute the total charge for each pizza order and the total revenue for all 10 orders. d. [10 points] Print the order information for each of the 10 orders in a table format. Information to be printed: pizza order ID (1-10), customer name, number of pizza, size of each pizza, topping of each pizza, distance for delivery, amount of discount, total charge (including delivery fee). e. [5 points] Print the total revenue at the end. 4. [5 points] Add sufficient comments. 5. [5 points] Make your program, especially the main function, as concise as possible. Requirements for deliverables [20 points] 1. Guidelines for programming assignment: For your final program please add the following comments as the header in your program that hosts the main function /** * Project 2 * Names of classes you defined: * Date of creation: * Date of modification: * Author: **/  Please comment your code to describe what you are doing. Your creativity is welcome.  Please choose meaningful variable names and avoid the variables such as h1, d1, etc.  You should debug and test your program to make sure your program has no syntax and logical errors. If you have any problem running your code, please document them by comments as well. 2. Submission Create a zipped folder named as YourGroupNumberProject2, which contains all of your files. Submit your zipped file to Group Project-2 dropbox in D2L by midnight of the due date.

1 CS174 Group Project-2 Pizza Order Processing (120 points) Project description: In this project, you are asked to write a program for a Pizza store to process pizza orders. Each pizza order includes the following information: (1) name of the customer, (2) number of pizzas, (3) size of each pizza, (4) topping of each pizza, and (5) distance for delivery. The charge information on an order is as follows:  There are 3 sizes of pizza: small, medium and large. Basic price of a pizza is: small – $5.99, medium – $8.99, and large – $11.99.  There are 6 toppings: cheese, pepperoni, sausage, onion, green pepper, and mushroom. No additional charge for cheese topping. For pepperoni topping, the additional charge is $1.5. For sausage topping, the additional charge is $2.5. For onion, green pepper, and mushroom toppings, the additional charge is $1.75 each. Note that the additional charge is the same for different sizes of pizzas.  A 20% off discount is applied to the total charge (before adding delivery fee) when a customer orders more than two large pizza.  If the distance is 0 (i.e. self-pickup), no delivery fee. If it is between 0 and 2 miles, the delivery fee is $2. If it is more than 2 miles, it is $2 plus $0.50 per mile. In order to reduce the complexity of the program, assume customer will order no more than 10 pizzas each time, and each pizza has only one topping. Project requirements: 1. Note: All variables should be defined as local variables (i.e., global variables are not allowed to use except of global constants) in the program. Otherwise, half of the points will be taken away from the following steps. 2. [45 points] Create and define a PizzaOrder class. The class should include: a. [10 points] Attributes (i.e., member variables): (1) order ID, (2) customer name, (3) number of pizzas, (4) sizes of pizzas, (5) topping of each pizza, and (6) distance for delivery. b. [30 points] Activities (i.e.,member functions): (1) constructor(s), (2) getters and setters for each attribute, (3) function for computing the delivery fee, (4) function for computing the topping fee, and (5) function for computing the total charge (including the basic price, topping fee, discount if any, and delivery fee) on a pizza order. 3. [45 points] In the main function: a. [10 points] Prompt the user to input 5 pizza orders, and at the same time to call a function named checkInputValidity, which is defined outside of the main function to check the validity of user inputs. That function should check whether user inputs a wrong size for a pizza in an order (note: there are only three choices for the Pizza size), or wrong topping info. for a pizza in an order (note: there only six choices for Pizza topping), or wrong delivery distance (note: the delivery distance must be between 0 and 10 miles). When an input is invalid, keep prompting the user to re-enter until a valid input is received. 2 b. [10 points] Create an object for each pizza order using an array of objects. c. [10 points] Compute the total charge for each pizza order and the total revenue for all 10 orders. d. [10 points] Print the order information for each of the 10 orders in a table format. Information to be printed: pizza order ID (1-10), customer name, number of pizza, size of each pizza, topping of each pizza, distance for delivery, amount of discount, total charge (including delivery fee). e. [5 points] Print the total revenue at the end. 4. [5 points] Add sufficient comments. 5. [5 points] Make your program, especially the main function, as concise as possible. Requirements for deliverables [20 points] 1. Guidelines for programming assignment: For your final program please add the following comments as the header in your program that hosts the main function /** * Project 2 * Names of classes you defined: * Date of creation: * Date of modification: * Author: **/  Please comment your code to describe what you are doing. Your creativity is welcome.  Please choose meaningful variable names and avoid the variables such as h1, d1, etc.  You should debug and test your program to make sure your program has no syntax and logical errors. If you have any problem running your code, please document them by comments as well. 2. Submission Create a zipped folder named as YourGroupNumberProject2, which contains all of your files. Submit your zipped file to Group Project-2 dropbox in D2L by midnight of the due date.

checkyourstudy.com Whatsapp +919911743277
P a g e | 1/8 ECE25100 Object-Oriented Programming Assignment 3 ********************************************************************************* NOTE: 1. Programs must compile without error. If your program does not compile, you will lose 50% of the points. Even if your program is “essentially” correct, you will still lose 50% of the points; there is no reason to turn in a program with syntax errors. 2. To get full credit for an assignment your program must completely solve the stated problem. 3. Your program should contain a reasonable amount of comments. At the very beginning of each file, there should be a comment containing the course number, your name, the assignment number, and the date. It is good practice to insert comments into the source code, as you do when programming in any other languages. /* Class: ECE25100 Object Oriented Programming Instructor: Xiaoli Yang Author: [Your Name] Assignment: [No.] File Name: Date: [MM]/[DD]/[YY] */ 4. You should follow the programming styles and guidelines set forth in class. In particular, use meaningful names for variables. For each coding question you should also write a test class and test your code thoroughly. 5. Compress all .java files into one zip file and name it with your full name firstname_lastname_assignment #.zip. Submit the zip file on blackboard. ********************************************************************************* Fishing … In this assignment, you will simulate some people catching (or trying to catch) fish in a lake. You will make two implementations…one in which the fish are stored in arrays and the other in which the fish are stored in ArrayLists. After you complete the assignment, you should understand how to manipulate arrays and ArrayLists… but you will also understand how the ArrayLists provide an advantage over Arrays which allows for simpler code. PART A: The Fish class Define a class called Fish that defines the following private instance variables: · species – a string indicating the type of fish (e.g., “Pike”, “Pickerel”, “Sunfish”, “Bass”, etc.) · size – an int indicating the size of the fish in cm. · hungry – a boolean indicating whether or not the fish is willing to take the bait Write: · get methods for each instance variable (call the one for hungry isHungry()) · a set method for the hungry variable. · a constructor that takes the size and species of the fish… assuming that new fish are always hungry · a zero-argument constructor that calls the above constructor with appropriate parameters P a g e | 2/8 · a toString() method that returns a string in the following format, depending on whether the fish is hungry or not: “A hungry 10cm Pike” or “A full 10cm Pike” Make sure that your code works before continuing. However, you do not have to make a specific test case here. PART B: The Lake class Define a class called Lake that defines the following private instance variables: · name – a String representing the name of the lake · fish – an array which will contain all Fish objects that are in the lake · capacity – an int indicating the maximum number of fish that can be kept in the lake · numFish – an int indicating the number of fish that are currently in the lake Write the following: · get methods for the name and numFish instance variables · a method called isFull() which returns a boolean indicating whether or not the lake has reached its capacity of fish · a constructor that takes the name and capacity of the lake · a constructor that takes zero-arguments · a toString() method that returns a string in the following format: “White Lake containing 8 fish” Also write the following more interesting methods: · a method called add which takes a single Fish parameter and adds the fish to the lake provided that the lake is not full. Nothing is returned. Note that later we will be removing fish from the array, so there may be some unused positions in the array. You just need to find one of these available positions. · a method called getHungryFish which returns the first fish found in the lake that is hungry. The fish should be removed from the lake and returned from the method. If there are no hungry fish, then null should be returned. · a method called listFish which lists (using System.out.println) all fish in the lake along with their position in the array as follows: Silver Lake containing 3 fish as follows: 0 – A hungry 35 cm Pike 1 – A full 6 cm Sunfish 2 – A full 10 cm Bass You must now test these methods with a test case that adds some fish to a lake, lists the fish, gets (i.e., removes) a few hungry fish, then lists the fish again. Make sure to also try getting some hungry fish when there are no more left. Also, try a test in which there are only nonhungry fish remaining and see whether or not null is returned from this method. Your test cases WILL be marked, so please be thorough. PART C: The Fisherperson class Define a class called Fisherperson with the following instance variables: · name – a String representing the name of the Fisherperson · fishCaught – an array which will contain all Fish objects that were caught and kept by this person · numFishCaught – an int indicating the number of fish that were caught and are currently P a g e | 3/8 being kept by this person Make the following two publicly accessible class variables: · LIMIT=3 (which is the maximum number of fish that all fisherpersons are allowed to keep by “law”). · MIN_KEEP_FISH_SIZE=10 (which is the mimimum size of fish that can be kept if caught. Anything smaller than this must be thrown back). Write the following: · get methods for all instance variables · a constructor that takes the name of the person · a toString() method that returns a string in the following format: “Bob with 2 fish” Also write the following more interesting methods: · a method called shouldKeep which takes a single Fish parameter and returns a boolean indicating whether or not the person should keep this fish. The person may keep the fish if he/she has not reached the fish limit AND the fish is at least 10cm long AND the fish is not a Sunfish. · a method called throwBackFish which takes a single Lake object parameter and returns no specific value. Starting with the last fish caught by this person, each fish should be returned to the specified lake one at a time until either the lake becomes full, or the person has no more fish. Note that you must change all instance variables for the person and the lake accordingly. · a method called tryToCatchFishIn which takes a single Lake object parameter and returns no specific value. The method should find a hungry fish from the lake and then decide whether the person should keep this fish or not. If able to keep the fish, the fish is removed from the lake and kept by the person. If unable to keep the fish, the fish must be returned to the lake. In either case, the fish should no longer be hungry :). (Would you wanna bite another hook after an ordeal like that ?) You MUST make use of your getHungryFish method. · a method called listFishCaught which lists (using System.out.println) all fish currently being kept by this person as follows: Fish that Fred has: A full 25 cm Pickerel A full 20 cm Bass You must now test these methods with this test case: public class LakeTester { public static void main(String [] args) { // Create a full lake with 10 fish Lake whiteLake = new Lake(“White Lake”, 10); whiteLake.add(new Fish(4, “Sunfish”)); whiteLake.add(new Fish(25, “Pickerel”)); whiteLake.add(new Fish(20, “Bass”)); whiteLake.add(new Fish(30, “Perch”)); whiteLake.add(new Fish(4, “Sunfish”)); whiteLake.add(new Fish(15, “Pickerel”)); P a g e | 4/8 whiteLake.add(new Fish(9, “Pickerel”)); whiteLake.add(new Fish(12, “Bass”)); whiteLake.add(new Fish(5, “Sunfish”)); whiteLake.add(new Fish(12, “Sunfish”)); whiteLake.listFish(); // Create another lake with 3 fish Lake silverLake = new Lake(“Silver Lake”, 5); silverLake.add(new Fish(35, “Pike”)); silverLake.add(new Fish(6, “Pike”)); silverLake.add(new Fish(10, “Pike”)); silverLake.listFish(); // Create two people to fish in the lakes Fisherperson fred = new Fisherperson(“Fred”); Fisherperson suzy = new Fisherperson(“Suzy”); for (int i=0; i<5; i++) { System.out.println("Fred tries to catch a fish in White Lake"); fred.tryToCatchFishIn(whiteLake); whiteLake.listFish(); fred.listFishCaught(); } for (int i=0; i<2; i++) { System.out.println("Suzy tries to catch a fish in White Lake"); suzy.tryToCatchFishIn(whiteLake); whiteLake.listFish(); suzy.listFishCaught(); } System.out.println("Suzy tries to catch a fish in Silver Lake"); suzy.tryToCatchFishIn(silverLake); silverLake.listFish(); suzy.listFishCaught(); System.out.println("Now Suzy and Fred will throw back their fish into Silver Lake"); suzy.throwBackFish(silverLake); suzy.listFishCaught(); fred.throwBackFish(silverLake); fred.listFishCaught(); silverLake.listFish(); }} Your output should look similar to this: White Lake containing 10 fish as follows: 0 - A hungry 4 cm Sunfish 1 - A hungry 25 cm Pickerel 2 - A hungry 20 cm Bass 3 - A hungry 30 cm Perch 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish P a g e | 5/8 9 - A hungry 12 cm Sunfish Silver Lake containing 3 fish as follows: 0 - A hungry 35 cm Pike 1 - A hungry 6 cm Pike 2 - A hungry 10 cm Pike Fred tries to catch a fish in White Lake White Lake containing 10 fish as follows: 0 - A full 4 cm Sunfish 1 - A hungry 25 cm Pickerel 2 - A hungry 20 cm Bass 3 - A hungry 30 cm Perch 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: NONE Fred tries to catch a fish in White Lake White Lake containing 9 fish as follows: 0 - A full 4 cm Sunfish 2 - A hungry 20 cm Bass 3 - A hungry 30 cm Perch 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: A full 25 cm Pickerel Fred tries to catch a fish in White Lake White Lake containing 8 fish as follows: 0 - A full 4 cm Sunfish 3 - A hungry 30 cm Perch 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: A full 25 cm Pickerel P a g e | 6/8 A full 20 cm Bass Fred tries to catch a fish in White Lake White Lake containing 7 fish as follows: 0 - A full 4 cm Sunfish 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: A full 25 cm Pickerel A full 20 cm Bass A full 30 cm Perch Fred tries to catch a fish in White Lake White Lake containing 7 fish as follows: 0 - A full 4 cm Sunfish 1 - A full 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: A full 25 cm Pickerel A full 20 cm Bass A full 30 cm Perch Suzy tries to catch a fish in White Lake White Lake containing 6 fish as follows: 0 - A full 4 cm Sunfish 1 - A full 4 cm Sunfish 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Suzy has: A full 15 cm Pickerel Suzy tries to catch a fish in White Lake White Lake containing 6 fish as follows: 0 - A full 4 cm Sunfish 1 - A full 4 cm Sunfish 2 - A full 9 cm Pickerel 7 - A hungry 12 cm Bass P a g e | 7/8 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Suzy has: A full 15 cm Pickerel Suzy tries to catch a fish in Silver Lake Silver Lake containing 2 fish as follows: 1 - A hungry 6 cm Pike 2 - A hungry 10 cm Pike Fish that Suzy has: A full 15 cm Pickerel A full 35 cm Pike Now Suzy and Fred will throw back their fish into Silver Lake Fish that Suzy has: NONE Fish that Fred has: A full 25 cm Pickerel A full 20 cm Bass Silver Lake containing 5 fish as follows: 0 - A full 35 cm Pike 1 - A hungry 6 cm Pike 2 - A hungry 10 cm Pike 3 - A full 15 cm Pickerel 4 - A full 30 cm Perch Also, you must come up with additional test cases as follows: · Someone fishes in a lake with capacity 0 (i.e., a dried up lake) · Someone fishes in a lake that has only non-hungry fish · Someone fishes in a lake with only hungry Sunfish Make sure to hand in all your test classes. PART D: Compare With ArrayLists In parts A through C, we implemented the Lake and Fishperson objects such that the fish were stored in arrays. Now, backup ALL your code CAREFULLY into a directory called "ArrayVersion". Make a NEW directory called "ArrayListVersion" and COPY all the java files into this new directory. You can hand in both of these directories with your assignment. We will now modify your code so that the fish are stored in ArrayList objects. Don't forget the proper import statement! Your Fish class will remain unchanged. In the Lake class: · change your fish instance variable to be a ArrayList object. · Remove the capacity instance variable, since ArrayLists have no fixed capacity. · Remove the numFish variable since we can ask an ArrayList for its size at any time. Remove the get method. P a g e | 8/8 Modify the constructors so that the capacity is not required and the fish ArrayList is made. · Modify the isFull method so that the lake is NEVER considered full. · Greatly simplify the add method. · Modify the getHungryFish method so that the fish is removed from the ArrayList (i.e., not replaced with null) when found. Also adjust the code as necessary to work for growable ArrayLists instead of the fixed-size arrays. · Modify the listFish method accordingly. In the Fisherperson class, make these changes: · change your fishCaught instance variable to be an ArrayList object. · Remove the numFishCaught variable since we can ask an ArrayList for its size at any time. Keep, but modify the get method. · Modify the constructors and toString method accordingly. · Modify all other methods as needed. Try to make use of the addAll and clear methods of the ArrayList class when modifying your throwFishBack method. Now test your code. Note that you implemented most of your code using Encapsulation techniques, so you should be able to use the same test methods that you made in PART C without modifying any of them. The output for the example code above should now be different since the order of items changes slightly depending on how you made your code changes.

P a g e | 1/8 ECE25100 Object-Oriented Programming Assignment 3 ********************************************************************************* NOTE: 1. Programs must compile without error. If your program does not compile, you will lose 50% of the points. Even if your program is “essentially” correct, you will still lose 50% of the points; there is no reason to turn in a program with syntax errors. 2. To get full credit for an assignment your program must completely solve the stated problem. 3. Your program should contain a reasonable amount of comments. At the very beginning of each file, there should be a comment containing the course number, your name, the assignment number, and the date. It is good practice to insert comments into the source code, as you do when programming in any other languages. /* Class: ECE25100 Object Oriented Programming Instructor: Xiaoli Yang Author: [Your Name] Assignment: [No.] File Name: Date: [MM]/[DD]/[YY] */ 4. You should follow the programming styles and guidelines set forth in class. In particular, use meaningful names for variables. For each coding question you should also write a test class and test your code thoroughly. 5. Compress all .java files into one zip file and name it with your full name firstname_lastname_assignment #.zip. Submit the zip file on blackboard. ********************************************************************************* Fishing … In this assignment, you will simulate some people catching (or trying to catch) fish in a lake. You will make two implementations…one in which the fish are stored in arrays and the other in which the fish are stored in ArrayLists. After you complete the assignment, you should understand how to manipulate arrays and ArrayLists… but you will also understand how the ArrayLists provide an advantage over Arrays which allows for simpler code. PART A: The Fish class Define a class called Fish that defines the following private instance variables: · species – a string indicating the type of fish (e.g., “Pike”, “Pickerel”, “Sunfish”, “Bass”, etc.) · size – an int indicating the size of the fish in cm. · hungry – a boolean indicating whether or not the fish is willing to take the bait Write: · get methods for each instance variable (call the one for hungry isHungry()) · a set method for the hungry variable. · a constructor that takes the size and species of the fish… assuming that new fish are always hungry · a zero-argument constructor that calls the above constructor with appropriate parameters P a g e | 2/8 · a toString() method that returns a string in the following format, depending on whether the fish is hungry or not: “A hungry 10cm Pike” or “A full 10cm Pike” Make sure that your code works before continuing. However, you do not have to make a specific test case here. PART B: The Lake class Define a class called Lake that defines the following private instance variables: · name – a String representing the name of the lake · fish – an array which will contain all Fish objects that are in the lake · capacity – an int indicating the maximum number of fish that can be kept in the lake · numFish – an int indicating the number of fish that are currently in the lake Write the following: · get methods for the name and numFish instance variables · a method called isFull() which returns a boolean indicating whether or not the lake has reached its capacity of fish · a constructor that takes the name and capacity of the lake · a constructor that takes zero-arguments · a toString() method that returns a string in the following format: “White Lake containing 8 fish” Also write the following more interesting methods: · a method called add which takes a single Fish parameter and adds the fish to the lake provided that the lake is not full. Nothing is returned. Note that later we will be removing fish from the array, so there may be some unused positions in the array. You just need to find one of these available positions. · a method called getHungryFish which returns the first fish found in the lake that is hungry. The fish should be removed from the lake and returned from the method. If there are no hungry fish, then null should be returned. · a method called listFish which lists (using System.out.println) all fish in the lake along with their position in the array as follows: Silver Lake containing 3 fish as follows: 0 – A hungry 35 cm Pike 1 – A full 6 cm Sunfish 2 – A full 10 cm Bass You must now test these methods with a test case that adds some fish to a lake, lists the fish, gets (i.e., removes) a few hungry fish, then lists the fish again. Make sure to also try getting some hungry fish when there are no more left. Also, try a test in which there are only nonhungry fish remaining and see whether or not null is returned from this method. Your test cases WILL be marked, so please be thorough. PART C: The Fisherperson class Define a class called Fisherperson with the following instance variables: · name – a String representing the name of the Fisherperson · fishCaught – an array which will contain all Fish objects that were caught and kept by this person · numFishCaught – an int indicating the number of fish that were caught and are currently P a g e | 3/8 being kept by this person Make the following two publicly accessible class variables: · LIMIT=3 (which is the maximum number of fish that all fisherpersons are allowed to keep by “law”). · MIN_KEEP_FISH_SIZE=10 (which is the mimimum size of fish that can be kept if caught. Anything smaller than this must be thrown back). Write the following: · get methods for all instance variables · a constructor that takes the name of the person · a toString() method that returns a string in the following format: “Bob with 2 fish” Also write the following more interesting methods: · a method called shouldKeep which takes a single Fish parameter and returns a boolean indicating whether or not the person should keep this fish. The person may keep the fish if he/she has not reached the fish limit AND the fish is at least 10cm long AND the fish is not a Sunfish. · a method called throwBackFish which takes a single Lake object parameter and returns no specific value. Starting with the last fish caught by this person, each fish should be returned to the specified lake one at a time until either the lake becomes full, or the person has no more fish. Note that you must change all instance variables for the person and the lake accordingly. · a method called tryToCatchFishIn which takes a single Lake object parameter and returns no specific value. The method should find a hungry fish from the lake and then decide whether the person should keep this fish or not. If able to keep the fish, the fish is removed from the lake and kept by the person. If unable to keep the fish, the fish must be returned to the lake. In either case, the fish should no longer be hungry :). (Would you wanna bite another hook after an ordeal like that ?) You MUST make use of your getHungryFish method. · a method called listFishCaught which lists (using System.out.println) all fish currently being kept by this person as follows: Fish that Fred has: A full 25 cm Pickerel A full 20 cm Bass You must now test these methods with this test case: public class LakeTester { public static void main(String [] args) { // Create a full lake with 10 fish Lake whiteLake = new Lake(“White Lake”, 10); whiteLake.add(new Fish(4, “Sunfish”)); whiteLake.add(new Fish(25, “Pickerel”)); whiteLake.add(new Fish(20, “Bass”)); whiteLake.add(new Fish(30, “Perch”)); whiteLake.add(new Fish(4, “Sunfish”)); whiteLake.add(new Fish(15, “Pickerel”)); P a g e | 4/8 whiteLake.add(new Fish(9, “Pickerel”)); whiteLake.add(new Fish(12, “Bass”)); whiteLake.add(new Fish(5, “Sunfish”)); whiteLake.add(new Fish(12, “Sunfish”)); whiteLake.listFish(); // Create another lake with 3 fish Lake silverLake = new Lake(“Silver Lake”, 5); silverLake.add(new Fish(35, “Pike”)); silverLake.add(new Fish(6, “Pike”)); silverLake.add(new Fish(10, “Pike”)); silverLake.listFish(); // Create two people to fish in the lakes Fisherperson fred = new Fisherperson(“Fred”); Fisherperson suzy = new Fisherperson(“Suzy”); for (int i=0; i<5; i++) { System.out.println("Fred tries to catch a fish in White Lake"); fred.tryToCatchFishIn(whiteLake); whiteLake.listFish(); fred.listFishCaught(); } for (int i=0; i<2; i++) { System.out.println("Suzy tries to catch a fish in White Lake"); suzy.tryToCatchFishIn(whiteLake); whiteLake.listFish(); suzy.listFishCaught(); } System.out.println("Suzy tries to catch a fish in Silver Lake"); suzy.tryToCatchFishIn(silverLake); silverLake.listFish(); suzy.listFishCaught(); System.out.println("Now Suzy and Fred will throw back their fish into Silver Lake"); suzy.throwBackFish(silverLake); suzy.listFishCaught(); fred.throwBackFish(silverLake); fred.listFishCaught(); silverLake.listFish(); }} Your output should look similar to this: White Lake containing 10 fish as follows: 0 - A hungry 4 cm Sunfish 1 - A hungry 25 cm Pickerel 2 - A hungry 20 cm Bass 3 - A hungry 30 cm Perch 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish P a g e | 5/8 9 - A hungry 12 cm Sunfish Silver Lake containing 3 fish as follows: 0 - A hungry 35 cm Pike 1 - A hungry 6 cm Pike 2 - A hungry 10 cm Pike Fred tries to catch a fish in White Lake White Lake containing 10 fish as follows: 0 - A full 4 cm Sunfish 1 - A hungry 25 cm Pickerel 2 - A hungry 20 cm Bass 3 - A hungry 30 cm Perch 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: NONE Fred tries to catch a fish in White Lake White Lake containing 9 fish as follows: 0 - A full 4 cm Sunfish 2 - A hungry 20 cm Bass 3 - A hungry 30 cm Perch 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: A full 25 cm Pickerel Fred tries to catch a fish in White Lake White Lake containing 8 fish as follows: 0 - A full 4 cm Sunfish 3 - A hungry 30 cm Perch 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: A full 25 cm Pickerel P a g e | 6/8 A full 20 cm Bass Fred tries to catch a fish in White Lake White Lake containing 7 fish as follows: 0 - A full 4 cm Sunfish 4 - A hungry 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: A full 25 cm Pickerel A full 20 cm Bass A full 30 cm Perch Fred tries to catch a fish in White Lake White Lake containing 7 fish as follows: 0 - A full 4 cm Sunfish 1 - A full 4 cm Sunfish 5 - A hungry 15 cm Pickerel 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Fred has: A full 25 cm Pickerel A full 20 cm Bass A full 30 cm Perch Suzy tries to catch a fish in White Lake White Lake containing 6 fish as follows: 0 - A full 4 cm Sunfish 1 - A full 4 cm Sunfish 6 - A hungry 9 cm Pickerel 7 - A hungry 12 cm Bass 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Suzy has: A full 15 cm Pickerel Suzy tries to catch a fish in White Lake White Lake containing 6 fish as follows: 0 - A full 4 cm Sunfish 1 - A full 4 cm Sunfish 2 - A full 9 cm Pickerel 7 - A hungry 12 cm Bass P a g e | 7/8 8 - A hungry 5 cm Sunfish 9 - A hungry 12 cm Sunfish Fish that Suzy has: A full 15 cm Pickerel Suzy tries to catch a fish in Silver Lake Silver Lake containing 2 fish as follows: 1 - A hungry 6 cm Pike 2 - A hungry 10 cm Pike Fish that Suzy has: A full 15 cm Pickerel A full 35 cm Pike Now Suzy and Fred will throw back their fish into Silver Lake Fish that Suzy has: NONE Fish that Fred has: A full 25 cm Pickerel A full 20 cm Bass Silver Lake containing 5 fish as follows: 0 - A full 35 cm Pike 1 - A hungry 6 cm Pike 2 - A hungry 10 cm Pike 3 - A full 15 cm Pickerel 4 - A full 30 cm Perch Also, you must come up with additional test cases as follows: · Someone fishes in a lake with capacity 0 (i.e., a dried up lake) · Someone fishes in a lake that has only non-hungry fish · Someone fishes in a lake with only hungry Sunfish Make sure to hand in all your test classes. PART D: Compare With ArrayLists In parts A through C, we implemented the Lake and Fishperson objects such that the fish were stored in arrays. Now, backup ALL your code CAREFULLY into a directory called "ArrayVersion". Make a NEW directory called "ArrayListVersion" and COPY all the java files into this new directory. You can hand in both of these directories with your assignment. We will now modify your code so that the fish are stored in ArrayList objects. Don't forget the proper import statement! Your Fish class will remain unchanged. In the Lake class: · change your fish instance variable to be a ArrayList object. · Remove the capacity instance variable, since ArrayLists have no fixed capacity. · Remove the numFish variable since we can ask an ArrayList for its size at any time. Remove the get method. P a g e | 8/8 Modify the constructors so that the capacity is not required and the fish ArrayList is made. · Modify the isFull method so that the lake is NEVER considered full. · Greatly simplify the add method. · Modify the getHungryFish method so that the fish is removed from the ArrayList (i.e., not replaced with null) when found. Also adjust the code as necessary to work for growable ArrayLists instead of the fixed-size arrays. · Modify the listFish method accordingly. In the Fisherperson class, make these changes: · change your fishCaught instance variable to be an ArrayList object. · Remove the numFishCaught variable since we can ask an ArrayList for its size at any time. Keep, but modify the get method. · Modify the constructors and toString method accordingly. · Modify all other methods as needed. Try to make use of the addAll and clear methods of the ArrayList class when modifying your throwFishBack method. Now test your code. Note that you implemented most of your code using Encapsulation techniques, so you should be able to use the same test methods that you made in PART C without modifying any of them. The output for the example code above should now be different since the order of items changes slightly depending on how you made your code changes.

checkyourstudy.com Whatsapp +919911743277
PDE assignment 3 Numerical Problems 1. (From Problem 1, Chapter 2, of Smith) Calculate a finite-difference solution of ut 􀀝 uxx 􀂟0 􀀜 x 􀀜 1, t 􀀞 0􀂠 satisfying the initial condition u 􀀝 sin􀂟􀀽x􀂠 when t 􀀝 0 for 0 ≤ x ≤ 1 and u 􀀝 0 at x 􀀝 0,1 for t 􀀞 0 Use the explicit method with 􀀭x 􀀝 0. 1, r 􀀝 0.1. Compare to the answers in Smith to check that your code is working. Then compute with 􀀭x 􀀝 0. 01, r 􀀝 0.1 and r 􀀝 0. 5. Determine and plot the solution to t 􀀝 0.01 and t 􀀝 0.1 for each case. Do not provide all output, just the plots and the specific approximations where you computed the exact solutions. Show that a solution of the PDE, satisfying the BC’s and IC’s is U􀂟x, t􀂠 􀀝 e−􀀽2t sin􀂟􀀽x􀂠 Verify the accuracy of your numerical approximations at t 􀀝 0. 005, t 􀀝 0.01 and t 􀀝 0.1 for x 􀀝 0.2 and x 􀀝 0.5 2. Showthat theCrank-Nicholsonschemeisconsistentandthat thelocal truncationerrorat the point 􀂟ih, jk􀂠 of the Crank-Nicholson approximation to Ut 􀀝 Uxx is of order O􀂟h2􀂠 􀀎 O􀂟k2􀂠. Then under the assumption that the scheme is unconditionally stable, prove that the solutions of the Crank-Nicholson scheme will converge to the true solution of the heat equation. 3. Provide the detail to show why the result of p. 56 of Smith proves that the Crank-Nicholson Scheme is unconditionally stable. That is, demonstrate why the spectral radius is as indicated and why it must be less than 1. See “challenge problem” below. 4. An alternate notation for writing out finite difference schemes employs the discrete differential operators, of order two 􀀭xUi, j 􀀝 Ui􀀎 12 , j − Ui− 12 , j 􀀭x 2Ui, j 􀀝 Ui􀀎1, j − 2Ui, j 􀀎 Ui−1, j The difference equation 1 − 12 r − 16 􀀭x 2 Ui, j􀀎1 􀀝 1 􀀎 12 r 􀀎 16 􀀭x 2 Ui, j gives the Douglas formula. Explicitly write out the Douglas formula in a form that allows us to write out the equivalent matrix formulation of the method. Also, write out the matricies for the formula. 5. Determine the matrix formulation of the Crank-Nicholson Scheme (e.g., BUj􀀎1 􀀝 CUj 􀀎 bj. Explicitlywrite out thematricies B,C and the vector b. 1 6. Develop the Crank-Nicholson equations for the problem in exercise 1 of Smith except with r 􀀝 k/h, 􀀭x 􀀝 0. 1, r 􀀝 0.5 . Solve them directly for two time-steps. Evaluate the corresponding analytical solution and calculate the absolute and relative errors in the numerical solution at the second time step for x 􀀝 0.2 and x 􀀝 0.5. Compare the result of this problem at t 􀀝 0.1 to the solution determined by the explicit method for the same r value. Discuss any observations. 7. (See problem 7 of Smith Chapter 2) A uniform solid rod of one-half a unit of length is thermally insulated along its length and its initial temperature at zero time is 0°C. One end is thermally insulated and the other supplied heat at a steady rate. Show that the subsequent temperatures at points within the rod are given, in non-dimensional form, by the solution of the equation ∂U ∂t 􀀝 ∂2U ∂x2 􀂟0 􀀜 x 􀀜 12 , t 􀀞 0􀂠 satisfying the initial condition U 􀀝 0 when t 􀀝 0 􀂟0 ≤ x ≤ 12 􀂠 and the boundary conditions ∂U ∂x 􀀝 0 at x 􀀝 0, t 􀀞 0, ∂U ∂x 􀀝 f at x 􀀝 12 , t 􀀞 0 where f is a constant. Solve this problem numerically for f 􀀝 1, to t 􀀝 1. 0, using a. theexplicitmethodwith 􀀭x 􀀝 0. 01, r 􀀝 14 b. theCrank-Nicholsonmethodwith􀀭x 􀀝 0. 01, r 􀀝 1.0 􀂀 Display tables of heat values for times t 􀀝 0. 01, 0. 05, 0. 1, 0. 5, 1.0 for both methods. Plot the solutions through t 􀀝 1.0 (3-D plots), 1 plot for each method. The analytical solution of the PDE is U 􀀝 2t 􀀎 12 12×2 − 1 6 − 2 􀀽2 Σ n􀀝1 􀀮 e−4􀀽2n2t cos􀂟2n􀀽x􀂠 􀀝 2 tΣn􀀝0 􀀮 i erf c 􀂟2n 􀀎 1 − 2x􀂠 4 t 􀀎 i erf c 􀂟2n 􀀎 1 􀀎 2x􀂠 4 t Compare the true solution at x 􀀝 0.3 for t 􀀝 0. 01, 0. 05, 0. 1, 0. 5, 1.0 to the approximate solutions from parts a. and b. above Here “compare” is most easily done by creating a small table with the analytical solution, explicit method solution and associated relative error, the C-N solution and its relative error. Discuss your observations. 8. Complete problem 6 of Smith Chapter 2. 9. Complete problem 13 of Smith Chapter 2. 2 Challenge Problem Using the cool fact about eigenvalues of a tridiagonal matrix, prove that the Crank-Nicholson difference approximation to the heat equation is unconditionally stable. Recall, the eigenvalues of an N 􀂕 N tridiagonal matrix are: 􀀵i 􀀝 a 􀀎 2 bc cos i􀀽 N 􀀎 1 , i 􀀝 1, . . . ,N where a,b and c may be real or complex numbers and each full row of the matrix has these constants in the order: c b a. 3

PDE assignment 3 Numerical Problems 1. (From Problem 1, Chapter 2, of Smith) Calculate a finite-difference solution of ut 􀀝 uxx 􀂟0 􀀜 x 􀀜 1, t 􀀞 0􀂠 satisfying the initial condition u 􀀝 sin􀂟􀀽x􀂠 when t 􀀝 0 for 0 ≤ x ≤ 1 and u 􀀝 0 at x 􀀝 0,1 for t 􀀞 0 Use the explicit method with 􀀭x 􀀝 0. 1, r 􀀝 0.1. Compare to the answers in Smith to check that your code is working. Then compute with 􀀭x 􀀝 0. 01, r 􀀝 0.1 and r 􀀝 0. 5. Determine and plot the solution to t 􀀝 0.01 and t 􀀝 0.1 for each case. Do not provide all output, just the plots and the specific approximations where you computed the exact solutions. Show that a solution of the PDE, satisfying the BC’s and IC’s is U􀂟x, t􀂠 􀀝 e−􀀽2t sin􀂟􀀽x􀂠 Verify the accuracy of your numerical approximations at t 􀀝 0. 005, t 􀀝 0.01 and t 􀀝 0.1 for x 􀀝 0.2 and x 􀀝 0.5 2. Showthat theCrank-Nicholsonschemeisconsistentandthat thelocal truncationerrorat the point 􀂟ih, jk􀂠 of the Crank-Nicholson approximation to Ut 􀀝 Uxx is of order O􀂟h2􀂠 􀀎 O􀂟k2􀂠. Then under the assumption that the scheme is unconditionally stable, prove that the solutions of the Crank-Nicholson scheme will converge to the true solution of the heat equation. 3. Provide the detail to show why the result of p. 56 of Smith proves that the Crank-Nicholson Scheme is unconditionally stable. That is, demonstrate why the spectral radius is as indicated and why it must be less than 1. See “challenge problem” below. 4. An alternate notation for writing out finite difference schemes employs the discrete differential operators, of order two 􀀭xUi, j 􀀝 Ui􀀎 12 , j − Ui− 12 , j 􀀭x 2Ui, j 􀀝 Ui􀀎1, j − 2Ui, j 􀀎 Ui−1, j The difference equation 1 − 12 r − 16 􀀭x 2 Ui, j􀀎1 􀀝 1 􀀎 12 r 􀀎 16 􀀭x 2 Ui, j gives the Douglas formula. Explicitly write out the Douglas formula in a form that allows us to write out the equivalent matrix formulation of the method. Also, write out the matricies for the formula. 5. Determine the matrix formulation of the Crank-Nicholson Scheme (e.g., BUj􀀎1 􀀝 CUj 􀀎 bj. Explicitlywrite out thematricies B,C and the vector b. 1 6. Develop the Crank-Nicholson equations for the problem in exercise 1 of Smith except with r 􀀝 k/h, 􀀭x 􀀝 0. 1, r 􀀝 0.5 . Solve them directly for two time-steps. Evaluate the corresponding analytical solution and calculate the absolute and relative errors in the numerical solution at the second time step for x 􀀝 0.2 and x 􀀝 0.5. Compare the result of this problem at t 􀀝 0.1 to the solution determined by the explicit method for the same r value. Discuss any observations. 7. (See problem 7 of Smith Chapter 2) A uniform solid rod of one-half a unit of length is thermally insulated along its length and its initial temperature at zero time is 0°C. One end is thermally insulated and the other supplied heat at a steady rate. Show that the subsequent temperatures at points within the rod are given, in non-dimensional form, by the solution of the equation ∂U ∂t 􀀝 ∂2U ∂x2 􀂟0 􀀜 x 􀀜 12 , t 􀀞 0􀂠 satisfying the initial condition U 􀀝 0 when t 􀀝 0 􀂟0 ≤ x ≤ 12 􀂠 and the boundary conditions ∂U ∂x 􀀝 0 at x 􀀝 0, t 􀀞 0, ∂U ∂x 􀀝 f at x 􀀝 12 , t 􀀞 0 where f is a constant. Solve this problem numerically for f 􀀝 1, to t 􀀝 1. 0, using a. theexplicitmethodwith 􀀭x 􀀝 0. 01, r 􀀝 14 b. theCrank-Nicholsonmethodwith􀀭x 􀀝 0. 01, r 􀀝 1.0 􀂀 Display tables of heat values for times t 􀀝 0. 01, 0. 05, 0. 1, 0. 5, 1.0 for both methods. Plot the solutions through t 􀀝 1.0 (3-D plots), 1 plot for each method. The analytical solution of the PDE is U 􀀝 2t 􀀎 12 12×2 − 1 6 − 2 􀀽2 Σ n􀀝1 􀀮 e−4􀀽2n2t cos􀂟2n􀀽x􀂠 􀀝 2 tΣn􀀝0 􀀮 i erf c 􀂟2n 􀀎 1 − 2x􀂠 4 t 􀀎 i erf c 􀂟2n 􀀎 1 􀀎 2x􀂠 4 t Compare the true solution at x 􀀝 0.3 for t 􀀝 0. 01, 0. 05, 0. 1, 0. 5, 1.0 to the approximate solutions from parts a. and b. above Here “compare” is most easily done by creating a small table with the analytical solution, explicit method solution and associated relative error, the C-N solution and its relative error. Discuss your observations. 8. Complete problem 6 of Smith Chapter 2. 9. Complete problem 13 of Smith Chapter 2. 2 Challenge Problem Using the cool fact about eigenvalues of a tridiagonal matrix, prove that the Crank-Nicholson difference approximation to the heat equation is unconditionally stable. Recall, the eigenvalues of an N 􀂕 N tridiagonal matrix are: 􀀵i 􀀝 a 􀀎 2 bc cos i􀀽 N 􀀎 1 , i 􀀝 1, . . . ,N where a,b and c may be real or complex numbers and each full row of the matrix has these constants in the order: c b a. 3

checkyourstudy.com Whatsapp +919911743277
CEE 213—Deformable Solids The Mechanics Project Arizona State University CP 5—Multispan Beam 1 Computing Project 5 Multispan Beam The computing project Multispan Beam concerns the analysis of a multispan beam that has four spans, three intermediate supports, and either fixed, simple, slide, or free conditions at the ends. The theory needed to execute this project is contained in the set of notes (entitled CP 5—Multispan Beam) that accompany this problem statement. Those notes provide an introduction to each aspect of the computation required to solve the problem. This project is an extension of CP 4—Plane Beam, and it would be a very good idea to use your code for that project as the starting point for this one. The task in this project is to write a code that will analyze the four-span beam. We will view the task as an application of the single span governing equations and we will establish continuity conditions at the support points. The CP 5 notes describe how to set up this analysis. The general steps are as follows: 1. Develop a routine based upon Simpson’s Rule to numerically integrate the applied loading terms that produce the quantities I0, I1, I2, and I3 that are mentioned in the CP4 notes. This code segment was included in CP 4 but now you have to do the computation for four spans. 2. Develop a routine to set up and solve the system of equations that allow for the determination of the state variables (w, , M, and V) at both ends of each bar. In this task you will need to set up the equations, boundary conditions at the ends, and the continuity conditions at the supports. The CP 5 notes describe how to do this in a fairly compact way (well suited for implementation in MATLAB). 3. Develop a routine to integrate the governing equations from the left end to the right end using generalized trapezoidal rule to do the integration numerically. Store the results at each step along the axis and provide a plot of the applied load q, the transverse displacement w, the rotation of the cross section , the bending moment M, and the net shear force V as functions of x. A good way to verify this step is to CEE 213—Deformable Solids The Mechanics Project Arizona State University CP 5—Multispan Beam 2 just plot the functions and verify that they are continuous at the supports (except shear, which should jump by the amount of the reaction forces at the supports). 4. Use the code to explore the response of the system: a. What is the effect of the choice of boundary conditions at the two ends? Does it make much difference on the interior spans? b. Study what happens to the shear and moment diagrams in the neighborhood of the supports. Can you generalize any of those observations? c. Can you apply different loading functions on different spans or different magnitudes of the same loading function on different spans with your code? d. Explore any other feature of the problem that you find interesting. Write a report documenting your work and the results (in accord with the specification given in the document Guidelines for Doing Computing Projects). Post it to the Critviz website prior to the deadline. Please consult the document Evaluation of Computing Projects to see how your project will be evaluated to make sure that you can get full marks. Note that there is no peer review process for reports in this course.

CEE 213—Deformable Solids The Mechanics Project Arizona State University CP 5—Multispan Beam 1 Computing Project 5 Multispan Beam The computing project Multispan Beam concerns the analysis of a multispan beam that has four spans, three intermediate supports, and either fixed, simple, slide, or free conditions at the ends. The theory needed to execute this project is contained in the set of notes (entitled CP 5—Multispan Beam) that accompany this problem statement. Those notes provide an introduction to each aspect of the computation required to solve the problem. This project is an extension of CP 4—Plane Beam, and it would be a very good idea to use your code for that project as the starting point for this one. The task in this project is to write a code that will analyze the four-span beam. We will view the task as an application of the single span governing equations and we will establish continuity conditions at the support points. The CP 5 notes describe how to set up this analysis. The general steps are as follows: 1. Develop a routine based upon Simpson’s Rule to numerically integrate the applied loading terms that produce the quantities I0, I1, I2, and I3 that are mentioned in the CP4 notes. This code segment was included in CP 4 but now you have to do the computation for four spans. 2. Develop a routine to set up and solve the system of equations that allow for the determination of the state variables (w, , M, and V) at both ends of each bar. In this task you will need to set up the equations, boundary conditions at the ends, and the continuity conditions at the supports. The CP 5 notes describe how to do this in a fairly compact way (well suited for implementation in MATLAB). 3. Develop a routine to integrate the governing equations from the left end to the right end using generalized trapezoidal rule to do the integration numerically. Store the results at each step along the axis and provide a plot of the applied load q, the transverse displacement w, the rotation of the cross section , the bending moment M, and the net shear force V as functions of x. A good way to verify this step is to CEE 213—Deformable Solids The Mechanics Project Arizona State University CP 5—Multispan Beam 2 just plot the functions and verify that they are continuous at the supports (except shear, which should jump by the amount of the reaction forces at the supports). 4. Use the code to explore the response of the system: a. What is the effect of the choice of boundary conditions at the two ends? Does it make much difference on the interior spans? b. Study what happens to the shear and moment diagrams in the neighborhood of the supports. Can you generalize any of those observations? c. Can you apply different loading functions on different spans or different magnitudes of the same loading function on different spans with your code? d. Explore any other feature of the problem that you find interesting. Write a report documenting your work and the results (in accord with the specification given in the document Guidelines for Doing Computing Projects). Post it to the Critviz website prior to the deadline. Please consult the document Evaluation of Computing Projects to see how your project will be evaluated to make sure that you can get full marks. Note that there is no peer review process for reports in this course.

checkyourstudy.com Whatsapp +919911743277
MATH 248 SPRIN 2017 – LABORATORY ASSIGNMENT 5 – Sochacki DUE: Monday April 3, 2017 POINTS: 50 You are to write a Matlab script that will solve an arbitrary tri-diagonal matrix system of equations using Gaussian elimination. Your program should determine if a unique solution exists and if it does give an approximation to this unique solution. You MUST use the computer with formatted output in a nice layout. Guidelines: (1) First you should do a neat one-three page (8.5 x 11) write up showing how to solve a tri-diagonal system of equations and do an operation count to determine the solution. (2) Your program should print the answer as a column in a nice format. (3) You should make sure your code can minimize round-off errors. (4) As usual, the professional quality of your scripts and write up is part of your evaluation. (5) You can do the following bonus problems for 2 points each. (i) Give the determinant of the matrix defining the SLE (ii) Give the inverse of the matrix defining the SLE

MATH 248 SPRIN 2017 – LABORATORY ASSIGNMENT 5 – Sochacki DUE: Monday April 3, 2017 POINTS: 50 You are to write a Matlab script that will solve an arbitrary tri-diagonal matrix system of equations using Gaussian elimination. Your program should determine if a unique solution exists and if it does give an approximation to this unique solution. You MUST use the computer with formatted output in a nice layout. Guidelines: (1) First you should do a neat one-three page (8.5 x 11) write up showing how to solve a tri-diagonal system of equations and do an operation count to determine the solution. (2) Your program should print the answer as a column in a nice format. (3) You should make sure your code can minimize round-off errors. (4) As usual, the professional quality of your scripts and write up is part of your evaluation. (5) You can do the following bonus problems for 2 points each. (i) Give the determinant of the matrix defining the SLE (ii) Give the inverse of the matrix defining the SLE

checkyourstudy.com Whatsapp +919911743277