Mathematic for software development

Mathematic for software development

 ASSIGNMENT TASK 1 1.1 Answer the following algebraic questions showing your work step by step [P1.1] 1.1.1 Determine the solutions of the following equations. 1.1.1.1 Linear equation: 6x – 18 = 6 1.1.1.2 Design a program using pseudocode to illustrate how you will solve the following linear equation: 7(5 – 3x) = 6x + 110. Follow the pseudocode to solve the equation and state the value of x. [P1.1, M1] 1.1.1.3 Quadratic equation: x2 – 9x + 20 = 0 Solve the following simultaneous equations by using algebraic method and graphical method. � ?? + 2?? = 12 2?? − 3?? = 10 1.1.2 Draw a graph for the quadratic equation 5×2 + 3x – 8 = 0 1.1.2.1 find the minimum point 1.1.2.2 the equation for the line of symmetry 1.1.2.3 the roots 1.1.2.4 use the quadratic formula to confirm the roots (values of x) 1.1.3 Find the linear equations for each of the below (Fig 1) straight lines. Mathematics for Software Development Page 3 of 10 Line A Line B Fig 1 1.2 Solve the following geometric and trigonometric questions. [P1.2] 1.2.1 the perimeter of the rectangle A in Fig 2 is 64 cm. Set up an equation and find the value of x. 1.2.2 The Hypotenuse and the opposite sides are given in cuboid B (Fig 2). Find the volume of the cuboid. Rectacngle A Cuboid B Fig 2 1.2.3 Below (Fig 3) circle has a diameter of 10m, you have to find: 1.2.3.1 the length of the side (a) in triangle ABC 1.2.3.2 the values of angle B and C 1.2.3.3 the area of the circle. 1.2.4 For the triangle in Fig 3 with angle θ find the height i.e. (c) side and all angles values using the relevant right angle triangle formula (sine, cosine and/or tangent). 1.2.5 You are required to design a program (using pseudocode or flowchart diagram) that will calculate the volume of a cuboid, rectangle and a square considering user inputs and Mathematics for Software Development Page 4 of 10 choices. The design should validate the user input and return the result to the user. [P1.2, M1] Fig 3 1.3 Solve the following vectors questions. [P1.3] 1.3.1 You have to show your work step by step and justify your answer to (iv) appropriately. The graph may not be accurately drawn. Fig 4 1.3.2 You are required to design (using pseudocode) a program that will add two generic vectors: a = (x, y) and b = (x, y). The values of x and y should be captured from user input and the outcome result should be displayed to the user. Implement the pseudocode using any mainstream programming language (e.g. Java or c#). [P1.3, D1]. Mathematics for Software Development Page 5 of 10 Ø To achieve M1, you should show proper design of the program (step by step) in 1.1.1.2 and 1.2.5 and you will have met the deadline to submit the tasks and achieve the unit assessment criteria. Ø To achieve D1, the appropriate structure and approach should be used in solving all related tasks in 1.3 in particular 1.3.2, where a well-designed and working program should be demonstrated. TASK 2 2.1 DUT institute has three campuses in London as follows: [P2.1] Locations: A= {Greenford, Greenwich, Holborn} 2.1.1 Currently, seven employees with the following details are managing the different campuses. Carl (Location: Greenford, age: 46, salary: £42,000), Oscar (Location: Greenford, age: 36, salary: £32,000) Ali (Location: Holborn, age: 25, salary: £21,000), Steve (Location: Greenwich, age: 45, salary: £23,000), Mike (Location: Greenwich, age: 50, salary: £19,000), Linda (Location: Greenford, age: 55, salary: £24,000), Carol (Location: Greenwich, age: 22, salary: £27,000). a) Draw a table and organise available employee data appropriately inside it. b) List all the names and ages of the employees in pairs in one set (Set Employee). c) Create sets of employees names that satisfying the conditions below: 1. (Age £ 23,000) 2. (Age> 29) OR (Salary < £24,000) 3. (Age< 53) XOR (Salary>£29,000) 4. (Salary > £24000) And (Location= Greenford) OR (Salary > £25000) And (Location= Greenwich) 5. Find out if any of the above sets is a subset of another set. 2.1.2 Discuss what kind of coding techniques you need to use in order to implement the addition, subtraction or multiplication of 2 different sets. Demonstrate your answer with proper code (e.g. Java, c#) example. [P2.1, D2]. 2.2. Matrices problems [P2.2] 2.2.1 Subtract the Q matrix from the P matrix and then scale the result matrix R by 3. P = � 1 −1 0 5 2 1 2 −1 −1 � Q = � 1 −1 3 −2 2 1 2 −1 −1 � 2.2.2 A local shop sells 3 types of pies a) Beef pies cost £5 each b) Chicken pies cost £4 each and c) Vegetable pies cost £3 each and this is how many they sold in 3 days Monday Tuesday Wednesday Beef pies 7 3 10 Chicken 9 8 5 Mathematics for Software Development Page 6 of 10 Vegetable 4 6 2 a) Create a matrix for the Pie prices and another for the quantity sold over the three days. b) Use matrix “dot product” approach to find out how much did the shop sell on each day. 2.2.3 Design a pseudo code or flowchart diagram that demonstrates how to perform product multiplication of the matrices created in 2.2.2 (a). [P2.2, M2] Ø To achieve M2, you should have designed and applied the matrices product multiplication in 2.2.2 properly and will have met the deadline to submit the tasks and achieve the unit assessment criteria. Ø To achieve D2, you should demonstrate proper explanation of 2.1.2 with relevant techniques and examples and will have met the deadline to submit the tasks and achieve the unit assessment criteria. In addition you will have met the deadline to submit the tasks and achieve the unit assessment criteria. TASK 3 3.1 Represent all of the elements available in the below sets (U, P and O) in a Venn diagram and identify the elements in P⋂O, P⋃O and PΔO. Discuss how you would apply set theory in programming technologies such as arrays and loops with examples from main stream programming languages (e.g. Java or C sharp) and design programs that will create the outcome of the new set(s)s (i.e. P⋂O, P⋃O and PΔO) [P3.1, D3] U = “universal set containing all Fibonacci numbers <= to 35” P = “all multiples of 3 available in the U set” O = “the first ten, odd numbers in the U set” 3.2 For all of the following sets defined in set−theoretic notation, list out all of the elements. In addition design a program that will verify if x element belongs to S1 and/or S2: [P3.2, M3] S1 = {x: x = 5n, where 4 ≤ n ≤ 9} S2 = {x: x = 3n2 , where 5 ≤ n ≤ 8} S3 = {y: y = 5n3 , where 2 ≤ n ≤ 5} S4 = {x: x = √n, where 15 < n < 17} 3.3 Solve the following Boolean algebra and logic gates questions a) Construct truth tables for the below Circuit Diagrams [P3.2] Mathematics for Software Development Page 7 of 10 b) For the following circuit, construct a truth table for each intermediate function and find the output function? [P3.2] c) Assume you have the following number 00100101 explain how you will be using control statements to XOR it with 11111111. Demonstrate your answer with relevant code examples using any mainstream programming language such as Java or C#. Display the expected output of this example. [P3.2, D3] Ø To achieve M3, the appropriate structure and approach has been used in structuring your answer and coherent, logical explanations of applications of set theory and design of program for the expected resulting set(s). Ø To achieve D3, you should have demonstrated that appropriate ideas generated and effective thinking has taken place specifically in questions 3.1 and in (c) of 3.3, you are required to state your solution step by step. TASK 4 4.1. a) A company has ten sales territories with approximately the same number of sales people working in each territory. Last month the sales orders achieved were as follows: Area A B C D E F G H I J Sales 110 120 140 120 140 200 110 130 100 120 For these sales show all the steps for calculating the followings: [P4.1] (i) Mean (ii) Mode (iii) Median (iv) Lower quartile (v) Upper quartile (vi) Standard deviation (vii) Mean deviation b) Design methods to calculate and display the mean, median and mode of 5 integer numbers using user input values. Write pseudocode for the methods and give examples of Mathematics for Software Development Page 8 of 10 implementation for any of them using any mainstream programming language such as Java or c#. [P4.1, M3] Ø To achieve M3, the appropriate structure and approach has been used in structuring your answer and coherent, logical development of Pseudo code for the use by programmers should be demonstrated.

Leave a Reply

Your email address will not be published. Required fields are marked *