1,475 Answered Questions for the topic computer programming

Computer Programming General Computer C++ Computer Science

10/19/21

program that will read in the quantities and prices items from a file then calculates the total price

Write a C++ program that will read in the quantities and prices items from a file then calculates the total price (quantity * price) for each item and saves it in another file including the... more

10/19/21

program that counts from 1 through 100, and prints “D3” if the number is evenly divisible by 3

Write a C++ program that counts from 1 through 100, and prints “D3” if the number is evenly divisible by 3, “D5” if it’s evenly divisible by 5, “D3&5” if it’s even divisible by three and five,... more

10/15/21

Why is the answer O(N^2) for this big-o question?

For this question:Approximate the runtime of the following code fragment, in terms of n: Write your answer in a format such as "O(N^2)" or "O(N log N)".int sum = 0;for (int i = 1; i <= n; i++)... more

10/15/21

Is my thought process for a big-o question correct?

For this question:Approximate the runtime of the following code fragment, in terms of n: Write you answers in a format such as O(N^2) or O(N log N):int sum = 0;for (int i = 1; i <= n; i++) { ... more
Computer Programming Computer Java Web Design

10/07/21

Please help with Java code

How can I define a for loop for the following output:1+2 = 32+3 = 54+5 = 98+9 = 1716+17 = 3332+33 = 6564+65 = 129any help would be very appreciated
Computer Programming Computer Science Programming Javascript

10/06/21

Create a function based on Deep Equality called deepEqual that takes two arguments 'true' and 'false'

Javascript. Create a function based on Deep Equality called deepEqual that takes two arguments 'true' and 'false' and returns true if the arguments are deep equal and false if the arguments are not... more
Computer Programming Python Programming

10/06/21

It should display stars, but it gives me an error

I am supposed to let the user enter number of rows and number of columns, but when I enter the rows and columns, it gives me this errorhttps://mrkzgulfup.com/uploads/163354717093041.jpgand it... more
Computer Programming

10/06/21

Why inter-process communication (IPC) is needed? Describe and contrast available IPC mechanisms.

 Why inter-process communication (IPC) is needed? Describe and contrast available IPC mechanisms.
Computer Programming C++ Computer Science Programming

10/06/21

QuickSort. Write the quickSortInternal function. Do not use std::algorithms.

Please include source code and make the code that you include bold. Write the quickSortInternal function. Do not use std::algorithms.You need to add your partitionFunc from the Partition Function... more
Computer Programming

10/04/21

Flowchart represents the logical sequence that combines steps to be performed

Computer Programming C++ Computer Science Programming

09/29/21

C++. Create a program that helps keeping track of song lists. Include code.

This program is an exercise in building, traversing, and destroying linear linked lists. The use of recursion should be included at least once in each assignment to better prepare us for future... more
Computer Programming Computer Computer Science Coding

09/28/21

Next Fit Algorithm Help

def NextFit(): boxes = readCSV() num_of_boxes = len(boxes) bin_area = 40 n_bin = 0 area_remaining_in_bins = [] lists = [] for x in range(num_of_boxes): ... more
Computer Programming Java Computer Science

09/25/21

Removing an element from a circular linked list

Here I have my code that deletes a given integer value from a circular linked list: public void remove(int item){ Node temp = tail.next; //Refers to the first index Node... more
Computer Programming Computer Computer Science

09/24/21

Circular Linked List: indexOf(int)Return the location fo the first occurrence of the value in the list. Return 0 if it is the first item. Return -1 if the item is not in the list.

So throughout my code I did not keep track of the size of the list. My code does add and deletes, but I was wondering how I could implement code where I don't necessarily need the size of the list... more
Computer Programming C++ Computer Science

09/23/21

Basic C++ Question

Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. Auxiliary highways are numbered 100-999, and service... more
Computer Programming Computer Science

09/18/21

Change the Computer class to a struct. 1. Keep the default and non-default constructors 2. Your struct does not need the accessors and mutators since all variables are public by default.

3.Also Perforom the following: Write a main(): - Create an instance of type Computer using the default constructor. - Set the values for year, model, and purpose using any values you'd like. -... more
Computer Programming Computer Science

09/17/21

Create three separate files for this code: 1. Computer.h holds the class' declaration 2. Computer.cpp holds the class' functions' definitions 3. Main.cpp holds the test code (i.e. the main function)

#include <iostream> #include <string> using namespace std; class Computer { private: int year; string model; string purpose; public: Computer(int y, string m, string m2)... more
Computer Programming Computer Science

09/16/21

Boolean Expression Grammar

Write a grammar for Boolean expressions , assuming that we already have rules in our grammar for arithmetic expressions . Arithmetic expressions might be simple literals like 3 or 97 or may be... more
Computer Programming Java Computer Science

09/16/21

Given the following method definitions for the Date class, identify the type of method (accessor or mutator),

Given the following method definitions for the Date class, identify the type of method (accessor or mutator), the return data type, if any, the explicit parameter data types, if any, and... more
Computer Programming Computer Science

09/15/21

Draw a circuit for the following: A'+B*C'

Computer Programming C++

09/12/21

complete the member function ( fdeviation(….)) of class Stats :

#include <iostream>#include <cmath>using namespace std;class Stats{ double mean, deviation; public: /** Function for computing mean of an array of double values */ double... more
Computer Programming

08/25/21

Please help me I don’t understand

Problem StatementDesign and implement a class named "Sport" in pseudocode which uses the OOP conventions discussed in this course and includes the following:• a data field which represents an... more
Computer Programming C++ Computer Science

08/24/21

Slove the code in C++ .Do not copy paste from net please.

#include <iostream> using namespace std; struct TreeNode { int data; TreeNode *left; TreeNode *right; }; class BinarySearchTree{ private: TreeNode* root; void insertNode(TreeNode *&tree,... more
Computer Programming Computer Science Computer Engineering

08/23/21

Solve it in python

2) Implement a recursive algorithm which will print all the elements of a non-dummy headed singly linked linear list in reversed order.Example: if the linked list contains 10, 20, 30 and 40, 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.