Discuss the Hamiltion circuit 1) sequential algorithm; 2) parallel algorithm; 3) discuss its time complexity.
In: Computer Science
Write a pyhton program and to evaluate polynomials in general and test it on the following: ? 4 − 3? 3 − 39? 2 + 47? + 170 = 0
a) Develop and test a function named evalPoly() that evaluates a polynomial at a given value of the variable. The function receives two arguments: a list of the polynomial coefficients, and the value of the variable. It returns the result of the evaluation as a float. Use your function to evaluate the polynomial at ? = -5.2, -5.0, -1.8, -1.6, 2.6, 2.8, 7.0 and 7.2. What do you conclude about the solutions to the equation above?
b) Write a second function named solvePoly() that seeks a solution of the polynomial between two values of the variable where the function has changed sign. This function should receive the list of coefficients, the two values of the variable between which there is a solution. It should return the value of the variable at which a solution was found. This function may be based on an exhaustive search, a bisection search, or on Newton-Raphson’s method. Select a method with some justification.
In: Computer Science
Write a python program to read from a file the names and grades of a class of students to calculate the class average, the maximum, and the minimum grades. The program should then write the names and grades on a new file identifying the students who passed and the students who failed. The program should consist of the following functions: a) Develop a gradesInput() function that reads data from a file and stores it and returns it as a dictionary. The function has one argument which is the name of the file where the data is entered. Each line on the file should contain the record of one student holding his or her name and the corresponding grade.
b) Write a second function gradesAssess() that iterates over the dictionary and determines the statistics on the average, minimum, and maximum of the grades and return these statistics as a list.
c) Write a third function gradesReport() that will iterate over the dictionary and write on a new file named Class_Results.txt the names of students whose grades are greater or equal to 60, preceded by the message “Passing Students”. Then the names of students whose grades are lower than 60 should be written on the file, preceded by the message “Failing Students”. Finally, the class statistics should be written on the file, also preceded by the message “Class Statistics”.
d) Write a main program that coordinates the operation of the three developed functions. The program should inform the user of what is its function and request from the user the name of the file where class names and grades are written. Form you own data file, Class_Data.txt that has the following entries : Raja, 90 Yahya, 50 Jad, 70 Hussein, 71 John, 97 Tony, 98 Nasser, 78 Maroun, 70 Pamela, 78 Maroun, 70 Ali, 74 Firas, 85
In: Computer Science
Write a program in python to calculate the value of cos(?) using its Taylor series expansion:
?2 ?4 ?6 ?8 cos(?)=1− + − + ...
The program should consist of the following functions:
a) Develop and test a cosCalc() function that receives as an argument, of type float, the value of the variable and returns the result as a float also. Include 20 terms maximum from the series, or until the value of a term is less than 1e-8. b) Write a main program to invoke the function and calculate and print the values of
2! 4! 6! 8!
?2?
cos (− ), cos(−?), and sin ( ).
In: Computer Science
In: Computer Science
Create one Main Use Case Diagram & five detailed use case diagrams(*use any online or offline tool while creating*) for BigBasket platform. These are the functional requirements or features I have picked out from the Bigbasket platform, you need to prepare use cases for these on:
FE-1: Order variety of products from Web-based/Mobile based application which is to be delivered.
FE-2: Dynamically add, delete, view, and modify the selected items from the cart.
FE-3: BB wallet - It’s a closed system pre-paid
payment instrument issued by IRCPL, alternatively, the customers
can save cards for future transactions or can also pay
through
UPI and other wallets like Paytm.
FE-4: BB star - Buy a subscription to become a premium member of Big Basket in order to enjoy added benefits.
FE-5: Chabot - Get customers query resolved by a trained bot and if the issue persists then redirect to Big basket front desk executive for better solutions to the issue.
FE-6: Different filters (shop by category, brand, price, discount, weight) must be there for ease of shopping.
Also, please write a detailed description of each one of the use case diagrams.
****** This is the complete information of the task to be done, there is no further information ******
In: Computer Science
In one of the buildings that your company has installed a network, some of the devices have stopped working completely. The devices do not even turn on. Your manager has requested that you investigate the possible causes of the damaged devices. Advise on what can be installed so that other devices can be protected. Explain two ways to achieve this
In: Computer Science
6.explain characterizing schedules based on recoverability and serialibality.(50marks)
Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote.
Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet answer n no plagarism.
its 50marks question so i il stricly review nd report
In: Computer Science
Without using extra data structures, write a recursive
method
recursiveProdcutQueue ( Queue <Integer> q) in Test class
(in
stacks_queues package) that receives a queue of integers and return
the
product of the integers inside the queue. Then don’t forget to test
the
method in the main.
Make sure not to change values in queue after calling the method
use java eclipse please
In: Computer Science
Programming Project #6: Bowling Team
need to use python
Problem
Expected Duration: 3-4 hours
Prerequisites: None
Knowing that you are a budding programmer, your friends have
asked you to create a scoring program for your Saturday bowling
league. Your program should take a name, team number, and score for
each player, and should deal with any number of players, but have 3
people to a team.
Your program should ignore invalid inputs, and not crash. Your
program should print the following lists in columns:
Last, your program should write each of the lists and the
summary information
to a text file called game_results.txt in the same format it is
displayed on the screen.
Note: You have the option of using pandas Dataframes in your
program. Just make sure the console and file output
has the required structure and format.
In: Computer Science
Task use c++ and Create Base class task with virtual method Create a pair of derivative classes of architecture, scientist, economist - Define a salary in each of these classes and create a method that prints the salary for each job Create a working object Use dynamic_cast Use typeid Create an object for each job that it will include the number of employees of that type and the method of printing these numbers
In: Computer Science
1. Design a class based on a modified Customer Structure. Use private and public definitions.
2. Create class methods (Setters and Getters) that load the data values. The Setter methods will validate the input data based on the criteria below and load the data into the class if valid.
For character arrays, the data must be within the specified data size. (See #3 below)
For zipCode, the number must be between 0 and 99999.
City and State need to be converted and stored in uppercase.
To get started loading the c-strings.
Getters
The book does not seem to provide a good example of what a (getter) method that returns a char array should look like. Section 9.9 is very close but uses string as examples instead of c-strings.
The best approach is to return a pointer to the c-string- Described as below:
char* getName(); // declaration - also known as prototype
// Customer is my Class name
char* Customer::getName() { // defined member function - Return a pointer to the c-string
return name;
}
cout << YOUR_INSTANCE_HERE.getName() << endl;
Setters
As for creating a setter method - you can define unsized char arrays in the method header
bool Customer::setName(char inputName[]) {
// code here..
}
3. Write a program that will allow me to enter data for the class and create and call a method that displays the data for the class.
During the input process, pass the input data to the setter method and confirm that the data entered is valid based on the class method return value. If not valid,prompt for me to re-enter the data until it does pass the class method's validation.(A do-while loop works well for this situation) I only need to enter the data for 1 instance of the class. The best way to do this is for the setter methods to return bool instead of void. If the data is valid, return true. Otherwise return false.
There is no need to loop for multiple instances of the object. Do not use cin statements inside the class method definitions.
Below is the original structure to use to create your class definition.
const int NAME_SIZE = 20;
const int STREET_SIZE = 30;
const int CITY_SIZE = 20;
const int STATE_CODE_SIZE = 3;
struct Customer {
long customerNumber;
char name[NAME_SIZE];
char streetAddress_1[STREET_SIZE];
char streetAddress_2[STREET_SIZE];
char city[CITY_SIZE];
char state[STATE_CODE_SIZE];
int zipCode;
};
Hints: The const variables need to be defined outside of the class definition.
All access to the data in the class must use public methods that you define. DO NOT DIRECTLY ACCESS the customer data items.
The class level input methods should return a boolean to confirm the data was loaded and passed any size or data ranges. The customerNumber setter does not need to return a value - It can be a void setter.
Set the customerNumber to 1 via the code - not user input. There is no input loop so only 1 set of customer's data is to be entered.
In: Computer Science
Write a python program to evaluate polynomials in general and test it on the following polynomial: ? 4 − 3? 3 − 39? 2 + 47? + 90 = 0
a) Develop and test a function named polyCalc() that evaluates a polynomial at a given value of the variable. The function receives two arguments: a list of the polynomial coefficients, and the value of the variable. It returns the result of the evaluation as a float. Use your function to evaluate the polynomial at ? = -5.4, -5.2, -1.2, -1.0, 2.0, 2.2, 7.2 and 7.4. What do you conclude about the solutions to the equation above?
b) Write a second function named polySolve() that seeks a solution of the polynomial between two values of the variable where the function has changed sign. This function should receive the list of coefficients, the two values of the variable between which there is a solution. It should return the value of the variable at which a solution was found. This function may be based on an exhaustive search, a bisection search, or on Newton-Raphson’s method. Select a method with some justification.
In: Computer Science
In: Computer Science
Write 3 detailed samples of scary text-based computer games. The location of your game could be a place that truly exists (possibly include research). Exclude graphic content. Remember to give choices to the player during the game.
In: Computer Science