Discuss and make summary notes about the following terminologies:
1. stack operations
2. stack applications
3. stack errors
4. queue operations
5. queue applications
Devise the algorithm for the following and verify whether they satisfy all the features.
1.An algorithm that inputs three numbers and outputs them in ascending order.
2.To test whether the three numbers represent the sides of a right angle triangle.
3.To test whether a given point p (x,y) lies on x-axis or y-axis .
4.To compute the area of a circle of a given circumference
5.To locate a specific word in a dictionary
Develop an algorithm in form of a pseudocode to solve the following problem: You are given an array of positive numbers, determine if there are any two integers in the array whose sum is equal to the given value X, and display all pairs of integers in the array that add up to X. Look at the below test case to guide you. (NB: do not write a C++ program but pseudocode) [5 Marks] Array: {7,1,2,8,4,3} Target sum/value (X)= 10 Expected Output: 7 + 3 = 10, 2 + 8 = 10
Build a class Mobile with the following data members Model (string) Brand (string) Price (float) simNum(string) 1. Provide a method print setSimNum(string num) that assigns the value num to the attribute simNum 2. Provide a method getNetwork() that returns a string telling which network operator this sim is registered on e.g. Warid, Jazz, Ufone, ,etc. For this you will have to get the first 4 chacters of the simNum and find out the network. E.g. if these 4 characters are 0300 then you will return “Jazz” , if these are 0333 then you will return Ufone and so on. Also provide a method print that prints all details about the mobile
Develop an algorithm in form of a pseudocode to solve the following problem: You are given an array of positive numbers, determine if there are any two integers in the array whose sum is equal to the given value X, and display all pairs of integers in the array that add up to X. Look at the below test case to guide you. (NB: do not write a C++ program but pseudocode) [5 Marks] Array: {7,1,2,8,4,3} Target sum/value (X)= 10 Expected Output: 7 + 3 = 10, 2 + 8 = 10
Class 5A in Sahara Tech Academy has a total of 5 Students. 2 of the students are male while 3 are female. In another stream 5B, in the same school, there are 6 students of which 4 are female and 2 male. Required. Women in Technology International (WITI), an international organization to empower women in technology has organized a symposium for all the female students in class 5 A and B. 1. Using 2D arrays in C++, write a program that registers all the students in both streams in different arrays i.e. 5A and 5B using first name and gender. Traverse through both registers, filter and come up with a full list i.e. 5C that has all the names of the students in 5A and 5B that qualified for the symposium a. Populating and displaying class 5A [2Marks] b. Populating and displaying class 5B [2 Marks] c. Displaying class 5C [5 Marks] 2. Comment important parts of your code.