Modify your assignment submission code to answer the following questions 1 Create an interface

Modify your assignment submission code to answer the following questions: 1. Create an interface StudentModel for the student model to store student data you wish to keep unchanged such as studentID and StudentEmail. Modify the existing Student class to implement StudentModel and convert it to an abstract class with the reportReport and deleteStudent as the abstract methods. 2. Consider the following two implementation options for student search for Array and ArrayList respectively. Implement a search without a for loop, you may use methods within the two data structures to optimize the code. public void searchStudent(String searchID) { int foundIndex = findStudentByID(searchID); if (foundIndex != -1) { System.out.println("Student found:"); System.out.println("Student ID: " + studentIDs[foundIndex]); System.out.println("Student Name: " + studentNames[foundIndex]); System.out.println("Student Email: " + studentEmails[foundIndex]); System.out.println("Student Course: " + studentCourses[foundIndex]); } else { System.out.println("Student with student ID " + searchID + " was not found."); } } private int findStudentByID(String searchID) { for (int i = 0; i < studentCount; i++) { if (studentIDs[i].equals(searchID)) { return i; } } return -1; }

Modify your assignment submission code to answer the following questions: 1. Create an interface StudentModel for the student model to store student data you wish to keep unchanged such as studentID and StudentEmail. Modify the existing Student class to implement StudentModel and convert it to an abstract class with the reportReport and deleteStudent as the abstract methods. 2. Consider the following two implementation options for student search for Array and ArrayList respectively. Implement a

Read More

Q2 Write the necessary python code to read the dataset file given to you and perform the following

Q2) Write the necessary Python code to read the dataset file given to you and perform the following tasks: 1. Detect and list missing data in the dataset. Then fill these missing values with the suitable values. 2. Detect the outliers in the dataset. Use a Boxplot for the graphical presentation and use the Percentile approach to eliminate the outliers. 3. For the cleaned dataset, provide the necessary statistical information. 4. Draw the correlation matrix. 5. Draw the density plots for the attributes.

Q2) Write the necessary Python code to read the dataset file given to you and perform the following tasks: 1. Detect and list missing data in the dataset. Then fill these missing values with the suitable values. 2. Detect the outliers in the dataset. Use a Boxplot for the graphical presentation and use the Percentile approach to eliminate the outliers. 3. For the cleaned dataset, provide the necessary statistical information. 4. Draw the correlation matrix. 5. Draw the density plots for the attr

Read More

Consider the class Rectangle class Rectangle f public Rectangle double 1 double w double

Consider the class Rectangle: class Rectangle { public: Rectangle(double 1, double w); double area() const; double getLength() const; double getWidth() const; private: double length; double width; }; (a) Derive a class Box from the class Rectangle. Provide only the interface for the class Box. The class Box has an additional private member variable height, and an additional public member function volume(). Include an accessor for the member variable height. Redefine the area() member function for the class Box. (6) (b) Implement the member function area() for the class Box. The outside surface area of a box is 2(hW) + 2(hL) + 2(WL), where h represents the height of the box, and W and L the width and length of the box respectively. (3)

Consider the class Rectangle: class Rectangle { public: Rectangle(double 1, double w); double area() const; double getLength() const; double getWidth() const; private: double length; double width; }; (a) Derive a class Box from the class Rectangle. Provide only the interface for the class Box. The class Box has an additional private member variable height, and an additional public member function volume(). Include an accessor for the member variable height. Redefine the a

Read More

Program 2 Matrix Multiplication This program multiplies two square matrices You can assume that

Program #2: Matrix Multiplication This program multiplies two square matrices. You can assume that the size of each matrix is 4×4. You are to design the processor’s FSMD, Datapath and control unit to execute this algorithm. The pseudocode is given below: MatrixMultiplication(matrixA, matrixB): rowsA = number of rows in matrixA colsA = number of columns in matrixA colsB = number of columns in matrixB result = create a new matrix with dimensions rowsA x colsB for i from 0 to rowsA – 1: for j from

Read More

Function Name savvyShopper Parameters fileName str shoppingMethod str Returns

Function Name: savvyShopper() Parameters: fileName (str), shoppingMethod (str) Returns: lowestPrice (tuple) Description: Your friend wants to buy the cheapest costume but does not want to deal with shopping both online and in-person. Write a function that takes in the mode of desired shopping (Online or In-store) and returns a tuple of the cheapest costume available in that mode and its price. Assume there will not be two costumes with the same lowest price. If the mode of shopping or the file name is invalid, return ("", 0). >> savvyShopper("costumeStore1.txt", "Online") ('Willy Wonka', 19.99) >> savvyShopper("costumeStore1.txt", "In-store") ('Thanos', 15.0)

Function Name: savvyShopper() Parameters: fileName (str), shoppingMethod (str) Returns: lowestPrice (tuple) Description: Your friend wants to buy the cheapest costume but does not want to deal with shopping both online and in-person. Write a function that takes in the mode of desired shopping (Online or In-store) and returns a tuple of the cheapest costume available in that mode and its price. Assume there will not be two costumes with the same lowest price. If the mode of shopping or the file n

Read More

Write a script that will import data from a file and calculate both the Euclidean and Manhattan

Write a script that will import data from a file and calculate both the Euclidean and Manhattan Distances for all points. Then determine which points are the closest and furthest apart. Create a data file with at least 20 rows. You will need 2 attributes for each data point. For example: Point A, Point B, and both points have 2 attributes, say Speed and Velocity. So your data file will have, at minimum, 4 columns.

Write a script that will import data from a file and calculate both the Euclidean and Manhattan Distances for all points. Then determine which points are the closest and furthest apart. Create a data file with at least 20 rows. You will need 2 attributes for each data point. For example: Point A, Point B, and both points have 2 attributes, say Speed and Velocity. So your data file will have, at minimum, 4 columns.

Read More

910 LAB Parsing food data Given a text file containing the availability of food items write a

9.10 LAB: Parsing food data Given a text file containing the availability of food items, write a program that reads the information from the text file and outputs the available food items. The program first reads the name of the text file from the user. The program then reads the text file, stores the information into the four string arrays predefined in the program, and outputs the available food items in the following format: name (category) - description Assume the text file contains the category, name, description, and availability of at least one food item, separated by a tab character ('t'). Hints: Use the fgets() function to read each line of the input text file. When extracting texts between the tab characters, copy the texts character-by-character until a tab character is reached. A string always ends with a null character (10). Ex: If the input of the program is: food.txt

9.10 LAB: Parsing food data Given a text file containing the availability of food items, write a program that reads the information from the text file and outputs the available food items. The program first reads the name of the text file from the user. The program then reads the text file, stores the information into the four string arrays predefined in the program, and outputs the available food items in the following format: name (category) – description Assume the text file contains the cate

Read More