1,523 Answered Questions for the topic computer science

06/23/20

Design a class template, Collection, that stores a collection of Objects (in an array), along with the current size of the collection.

Provide public functions isEmpty, makeEmpty, insert, remove, and contains.contains(x) returns true if and only if an Object that is equal to x ispresent in the collection.

06/23/20

Rehashing requires recomputing the hash function for all items in the hash table. Read more.....

Since computing the hash function is expensive, supposeobjects provide a hash member function of their own, and each objectstores the result in an additional data member the rst time the... more

Any help please.

Define a Rectangle class that provides getLength and getWidth. Usingthe findMax routines in implementation, write a main that creates an arrayof Rectangle and finds the largest Rectangle first on... more

Using the quicksort implementation, determine the running time of quicksort for random input, sorted input and reverse-order input.

This is the implementation.template <typename Comparable>void SORT( vector<Comparable> & items ) { if( items.size( ) > 1 ) { vector<Comparable> smaller;... more

06/22/20

Java Classes & Objects

How do we calculate the average marks of s, s1, s2 & s3class Test{ public static void main(String args[]){ Student s; s = new... more
Computer Science Computer C++ Computer Programming

06/16/20

File Compression and multi-dimensional arrays

"Need a new c++ code done in Dev-C++ 5.11""Compiler set to configure TDM-GCC 4..9.2 64-bit Release"Scenario (need c++ coding)A simple matrix could be used to store data about images by using 1’s... more
Computer Science

06/15/20

what's the easiest way to do file compression and multi-dimensional arrays

Computer Science Computer Organization

06/14/20

Computer Organization Question

Write a set of instructions to evaluate the arithmetic expression given below: X= (A * B)/(C – D + E) + F i)       Using General register computer with two address instructions ii)     Using an... more

06/10/20

Computer coding

What does this function do? float function(int x) { float result = 0.0; float sign = 1.0  for (int n = 1; n <x;n = n + 2) { result = result + sign / n; } return 4.0 *... more

06/10/20

Float function (computer coding)

What does this function do? float function(int n) { float result = 1.0; float factor = 1.0 + 1.0 / n for (int i = 0; i <n; ++i) { result = result * factor } return... more

Computer coding hw question

What sort of runtime error will occur when this program is run? void countdown () {   int i = 100;     int n = 5;   while (i > 0) { i = i -n; n = n / -1; print (i + n) ; Divide by... more
Computer Science Java Computer Programming Coding

06/07/20

I am having difficulty on why my program cannot be outputted. Can you please tell me where I did wrong. My code is pasted below.

import hsa.Console;import java.awt.*;import java.io.*;import java.util.*;public class HangMan{ static Console c; public static void main (String []args) throws IOException { // Main Method. ... more
Computer Science Java Coding

06/07/20

I need to have a functional code that can do the following requirements. My game is hangman. My question is that I don't what to start.

I need a functional program that has all the requirements:Final Programming Assignment.For the selected game, my program must provide the following features: • Player vs Computer format. • A game... more
Computer Science

06/07/20

Data Structures

Are your familiar with Data Structures?

06/07/20

File Compression and multi-dimensional arrays

Scenario (need c++ coding)A simple matrix could be used to store data about images by using 1’s and 0’s to represent darkand light shades of color similar to a bitmap. You will find a file data.txt... more
Computer Science

06/05/20

NEED HELP ASAP!!!

Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods. Also, design a program that creates three instances of... more
Computer Science

06/05/20

NEED HELP ASAP!!!

Design a program that lets the user enter the total rainfall for each of 12 months into an array. The program should calculate and display the total rainfall for the year, the average monthly... more
Computer Science

06/05/20

NEED HELP ASAP!!!

Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the... more
Computer Science Computer Programming

06/05/20

NEED HELP ASAP!!!

Design a program that calculates and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speed limit and the driver’s speed.... more
Computer Science Computer Programming

06/04/20

NEED HELP ASAP!!!!

Design a modular program that allows the user to enter twowords as separate inputs, one a noun and the other a verb. Then display the following three messages:    noun verb . is a simple... more
Computer Science Math Science English

05/30/20

Please give me a concept about your thinking in this issue.

Faced with the need to deliver risk ratings for your organization, you will have to substitute the organization’s risk preferences for your own. For, indeed, it is the organization’s risk tolerance... more
Computer Science Computer Programming Python Ruby

05/29/20

Describe the four pillars of object oriented programming

Encapsulation, Inheritance, Abstraction, Polymorphism
Computer Science Computer Programming

05/26/20

Recursive Function Tracing

Consider the following recursive functions. public static int square(int n) { if (n == 0) return 0; return square(n-1) + 2*n - 1; } public static int cube(int n) { if (n == 0) return 0; ... more
Computer Science Computer Programming

05/26/20

Recursive Method Tracing

Consider the following recursive function. public static void mystery(int n) { if (n == 0 || n == 1) return; mystery(n-2); System.out.println(n); mystery(n-1); } Write out the steps of the... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.