Questions
In Python, there are different sorting algorithms. Selection Sort, Bubble Sort and Insertion Sort. • Write...

In Python, there are different sorting algorithms.

Selection Sort, Bubble Sort and Insertion Sort.


• Write a Pseudo code first for each of these sort methods.  


• After writing the pseudo code write python code from the pseudo code.


• Upload the pseudo code and Python code for each of the three algorithm mentioned.

In: Computer Science

C++ Problem Use the following global structure declaration as an example only. You will need to...

C++ Problem

Use the following global structure declaration as an example only. You will need to create your own data structure based on a database of your own design. For example, movies in a video collection, houses for sale, business appointments, etc. Your data structure should include a minimum of four fields. At least one field should be string, and one field should be numeric (int, or double).  

Example Only

struct VEHICLE

{

string make;

string model;

int year;

int miles;

double price;

};

In main() create an array that has room that has room for 50 database records(i.e. an array of structures). Your program should support the following general menu choices –

  1. Add Items (i.e. Add Vehicle)

  2. List All Items (i.e. Show All Vehicles)

      Q. Quit

Your program should implement a separate function to add items, and display items. For example,

void addVehicle(VEHICLE arr[], VEHICLE addItem, int pos);

adds vehicle item that is a structure to the pos position in the dealer array.

void displayAll(VEHICLE arr[], int n);

displays all vehicle info for the number of vehicles stipulated (i.e. 0 to n-1)

Notes: You are welcome to create one or more additional functions to support your program. For example, showMenu, or getMenuChoice might be useful. Also, you might create a function to collect information, for example, a getVehicleInfo function could populate a structure that was passed ByRef. Please note, in the example above, addVehicle is passed a structure variable in addition to the array. In this approach, addVehicle should take the passed structure variable and add it to the dealer array at the position stipulated. You will need to use an index variable that your program can use to keep track of the next available position in the dealer array. This index variable should be local to main(). So NO global variables please. You will need to update or increment this index variable everytime you call addVehicle. You can use this variable when calling addVehicle, and displayAll.

In: Computer Science

Create a system which ends when the user wants it to. After a user has used...

Create a system which ends when the user wants it to. After a user has used this system, there is an option of another user using it. The system should ask whether you want to continue or not. Below is a sample of the input/output system.

Are you a student or a librarian?
Hit 1 for student and 2 for librarian.
$1
Enter Name: $William
How many books do you want to take?
$4
What books do you want to take?
Enter book ISBN no(Ex: 242424) // Let's assume we have a 6 digit ISBN number for this project. Put any number to test //your system.
$454092

$535212

$676685

$128976
William borrowed 4 books.
Hit 1 to continue 0 to end system
$1
Are you a student or a librarian?
Hit 1 for student and 2 for librarian.
$2
Enter Name: $Miss Benny
0 Lisa borrowed 1 books //format: student_id Student_name "borrowed" number_of_books "books"
1 William borrowed 4 books
Type student id for more info.
$ 0
Lisa borrowed 1 books
235633
Hit 1 to continue 0 to end system
$0

//There needs to be an array for studentid, student name, isbn index start #, isbn index end #, and libarian name

This is also C++,

If you need further information please specify in the comments and I will edit the problem as needed. I need this information ASAP please.

The $ represents inputs made by the "user"

In: Computer Science

What are the phases in a traditional project life cycle? How does a project life cycle...

What are the phases in a traditional project life cycle? How does a project life cycle differ from a product life cycle? Why does a project manager need to understand both?

In: Computer Science

Briefly explain the differences between functional, matrix, and project organizations. Describe how each structure affects the...

Briefly explain the differences between functional, matrix, and project organizations. Describe how each structure affects the management of the project.

In: Computer Science

Write in python: Go through the visualization of the Selection Sort, Bubble Sort and Insertion Sort....

Write in python:

Go through the visualization of the Selection Sort, Bubble Sort and Insertion Sort.

Write a Pseudo code first for each of these sort methods. After writing the pseudo code write python code from the pseudo code.

In: Computer Science

How has wi-fi changed the landscape of channel technology?

How has wi-fi changed the landscape of channel technology?

In: Computer Science

Write comprehensively on the below : What are the data gathering techniques used by the United...

Write comprehensively on the below :

What are the data gathering techniques used by the United states department of treasury ?
Problem faced by the department, how its solved by analytics and explain the analytics method used

In: Computer Science

1) Using either emacs or vi write a C program that reads 100 integers from stdin...

1) Using either emacs or vi write a C program that reads 100 integers from stdin into a 2-dimensional 10x10 array. The program will read one additional integer which is
used to multiply each element of the array. The final array should be printed to stdout as follows:

Run 1:
Enter 100 integers: 1 2 3 4 5 6 7 8 9 10 11 …. 100
Enter factor: 3
Result:
3 6 9 12 … 30
33 36 39 42 … 60
. … 90
.
.
273 276 279 282 … 300

In: Computer Science

Java question, not sure how to do this... You need to create a base class that...

Java question, not sure how to do this...

You need to create a base class that should have the following functionality.

- Calculate avg. Students grade. Input parameter to this method is an array that shows grades for at least ten courses.

You need to create a child class that inherits the base class. The child class should have a method to calculate max grade from 10 courses.

You need to write a demo class. The demo class should have a main method that calls child class and able to provide max and avg. Grade.

In: Computer Science

Okay, I have a general idea of how to use the scanner, but i'm a bit...

Okay, I have a general idea of how to use the scanner, but i'm a bit confused of how to ask multiple questions and also how maps work, which is making me struggle on this questions... If i had more time, i'd study a bit more, but I only have about 3 hours. If possible, could you explain every step with comments?

Use the scanner class to ask users their name and age. Store at least 10 users on a map, and use the iterator to print all the values. Print the youngest user's name

In: Computer Science

8. Assume you have a singly linked list with no tail pointer. Implement removeTail(). Raise an...

8. Assume you have a singly linked list with no tail pointer. Implement removeTail(). Raise an exception of the method is called on an empty list.
template<typename Object> class LinkedList {
private:

class Node {

Object data;

Node* next;

};

Node *head;
public:

LinkedList() : head(nullptr) {}

Object removeTail(Object data);

};


9. What are iterators? What purpose do they serve?
10. What does it mean to invalidate an iterator?
11. Explain the difference between separate chaining and open addressing in hash tables.
12. Define load factor and explain its relevance to hash table performance.
13. What are collisions with respect to hash tables?
14. Which hash tables distinguish between slots that have never been used, and slots that once contained an item but has now been deleted.
15. List and explain the worst-case and average-case running times for each HashTable method below
(a) void insert(Key k, Value v)

(b) bool contains(Key k)

(c) Value get(Key k)

In: Computer Science

1. Write a function named computeInterest that computes the amount # of interest on a given...

1. Write a function named computeInterest that computes the amount

# of interest on a given amount of money. The function should accept

# the amount of starting money (deposit) and the interest rate (rate)

# and return total amount of money in account after the interest is added.

# Just use a basic interest calculations. For example, for a deposit of

# 100 and a rate of 0.045 your function should return 104.5.

# You must have exception handling. If a string value is sent to the

# function instead of a number, print "Use only numeric values".

#

# Finally, add MULTIPLE doctest tests to the docstring below to test your

# computeInterest method using a number different values

def computeInterest(deposit, rate):

'''

Compute and return the total value of a deposit after applying a simple

interest amount.

TESTS BELOW:

PYTHON

In: Computer Science

I was asked to create a function called mydrawing in Matlab to draw or plot lines...

I was asked to create a function called mydrawing in Matlab to draw or plot lines onto a graph, using a so called pen.

The pen will start at the origin and will move along the +ve horizontal axis. The pen is also supplied with a list of commands in a form of a string, to draw or plot the lines onto the graph. The string commands are:

1) 'F' : the pen moves forward by x = 1.0

2) 'R' : the pen will turn right by a known angle

3) 'L' : the pen will turn left by a known angle

This function is written in such a way that if I type mydrawing(*insert the string*, *insert the angle*), I could draw or plot a square in the graph.

How do I code for these functions in Matlab?

In: Computer Science

6. List and explain the worst-case and average-case running times for each LinkedList method below: (a)...

6. List and explain the worst-case and average-case running times for each LinkedList method below:
(a) insert(iterator here, Object item)

(b) insertAtHead

(c) insertAtTail (aka push back)

(d) get(iterator here)

(e) get(index i)

(f) remove(iterator here)

(g) remove(index i)

(h) splice(iterator place here, iterator from here, iterator to here)


7. When should you use a Vector, and when should you use a Linked List?

In: Computer Science