Questions
*C PROGRAMMING* Create a program which requires the computer to guess the user's number from 1-100....

*C PROGRAMMING*

Create a program which requires the computer to guess the user's number from 1-100. The user does not need to enter their number at any point. The computer should just guess a random number, and then the user can choose whether or not the number is too high or too low, and if the computer does not guess the correct number, it will will keep guessing and eliminate the values from the range that is either too high or too low (depending on the user's selection after a guess is made).

EXAMPLE OF PROGRAM LOGIC:

num = 38 (user's selection - not actual input)

1 to 100 (high and low variables initialized)

computer guess 50 (guess determined by 1 + 100 / 2)
high (user says the number is too high)

49 (new high value - if high subtract 1 from guess and store in high)
computer guess 25 (guess determined by 1 + 49 / 2)
low (user)

26 (new low value - if low add 1 to guess and store in low)
computer guess 38 (guess determined by 26 + 50 / 2)
Correct! (user)

In: Computer Science

I need to have someone design a website using Code one JavaScript server application using Node.js...

I need to have someone design a website using

  • Code one JavaScript server application using Node.js for routing, Express.jsfor framework and Handlebars.js for templating
  • Necessary npm modules are: express, express-handlebars, path and body-parser

- it willl have a drop down box with 5 names of titles of a picture.

- highlite 1 name in dropdown box and there is a select button to make web site go to that picture stored on server..

this is my third question on this site and i have yet to receive any help. so I really need help on this now because i am so far behind

In: Computer Science

The following program calls the fork() system call to create a child process. Suppose that the...

The following program calls the fork() system call to create a child process.

Suppose that the actual pids of the parent process and child process are as follows:

Parent process: 801

Child process:   802 (as returned by fork)

Assume all supporting libraries have been included.

=> Use the answer text field to write the values of the pids printed at lines 1, 2, 3, and 4 (indicate each line number and the value printed).

int main()

{

     pid_t pid, pid1;

     pid = fork(); /* fork a child process */

     if (pid < 0) {

          fprintf(stderr, "Error creating child.\n");

          exit(-1);

     }

     else if (pid > 0) {

          wait(NULL); /* move off the ready queue */

          pid1 = getpid();

          printf(pid); /* Line 1 */

          printf(pid1); /* Line 2 */

     }

     else {

          pid1 = getpid();

          printf(pid); /* Line 3 */

          printf(pid1); /* Line 4 */

     }

     return 0;

}

In: Computer Science

Privacy and Security The purpose of this exercise is to review the privacy and security policies...

Privacy and Security

The purpose of this exercise is to review the privacy and security policies of a web site.   Pick a commercial web site (one that sells a product online), locate the privacy policy and the security policy, and read both.   Complete the Web Analysis form and provide the following information:

  • Provide a summary of the privacy policy.   What did you find comforting about the policy?   What did you find in the policy that concerns you?

  • Provide a summary of the security policy.

  • Opinion:   Are these policies defined to protect you, the consumer, or YOU, the business?   Explain your answer.

In: Computer Science

Implement the constructor, accessor (getter) and mutator (setter) methods indicated in the comments below for the...

Implement the constructor, accessor (getter) and mutator (setter) methods indicated in the comments below for the following class Player.

public class PlayerTester
{
public static void main(String[] args)
{
Player p = new Player("John Adam");
p.addScore(70);
p.addScore(80);
System.out.println("Average score is " + p.averageScore());
}
}

public class Player
{
private String name;
private double totalScore;
private int gamesPlayed;

//constructor with one parameter for the player name - 2 points

//Three accessor methods: getName(), getTotalScore(), getGamesPlayed() - 2 points each

//One mutator method: addScore(double) - 2 points

public double averageScore()
{
double avg = totalScore / gamesPlayed;
return avg;
}
}

In: Computer Science

I need new and unique answers, please. (Use your own words, don't copy and paste), Please...

I need new and unique answers, please. (Use your own words, don't copy and paste), Please Use your keyboard (Don't use handwriting) Thank you...

Question 2: [2.5 Points]

For each of the following design goals, assign into its corresponding category (Quality Attributes).

  1. TicketDistributor must be able to process and distribute 100 thousand user’s concert tickets within 15 seconds limit.
  1. The online banking system must be able to run on iOS, Windows, and Linux.
  1. The website should be always accessible to users 24/7. It should tolerate server crashes and high traffic load.
  1. The application should be finalized and deployed within a month.
  1. Users should know how to use the children’s game for the first time within 1 hour.

In: Computer Science

How should one go about proving the following distributions without using truth tables only using logical...

How should one go about proving the following distributions without using truth tables only using logical laws.

[ X ∧ (Y ⇒ Z) ≡ ? ]

[ (Y ≡ Z ) ⇒ X ≡ ? ]

In: Computer Science

Systems Development Life Cycle is composed of five phases. If you have been hired to develop...

Systems Development Life Cycle is composed of five phases. If you have been hired to develop an information system for your university. Indicate for each case in which phase you are when handling each of the following reports with justifications.

1. You obtained report showing whether the information system is feasible or not      

[ Select one]

a. Maintenance

b. Implementation

c. Design

d. Investigation

e. Analysis

2. You want to correct error that when the system is running

[ Select one]

a. Maintenance

b. Implementation

c. Design

d. Investigation

e. Analysis

.

3. You obtained the system requirements in the form of logical model

[ Select one]

a. Maintenance

b. Implementation

c. Design

d. Investigation

e. Analysis

4. You obtained system specification from a logical model

[ Select one]

a. Maintenance

b. Implementation

c. Design

d. Investigation

e. Analysis

  

In: Computer Science

write a program in c language to count the number of spaces ina sentence .the sentence...

write a program in c language to count the number of spaces ina sentence .the sentence is saved in the string 'sentence'
write it in a repl.it and along with input,output and algorithm

In: Computer Science

1. Discuss the elements of a database system. Like The database schema Schema objects Indexes Tables...

1. Discuss the elements of a database system. Like

  • The database schema
  • Schema objects
  • Indexes
  • Tables
  • Fields and columns
  • Records and rows
  • Keys
  • Relationships
  • Data types

2. Discuss the key components of a database management system architecture and how they collaborate.

3. Discuss why a database management system needs a good query optimizer.

In: Computer Science

Let us say we are given the task of building an automated taxi. Define the constraints....

Let us say we are given the task of building an automated taxi. Define the constraints. What are the inputs? What is the output? How can we communicate with the passenger? Do we need to communicate with the other automated taxis, that is, do we need a “language”?

In: Computer Science

An operating system uses the Round Robin (RR) without priority CPU scheduling algorithm, with a quantum...

An operating system uses the Round Robin (RR) without priority CPU scheduling algorithm, with a quantum = 4.

Consider the following set of processes in this OS, with the length of the CPU burst time given in milliseconds, and the shown priority.

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.

Process Burst Time Priority
P1 5 2
P2 10 5
P3 4 1
P4 6 4
P5 9 3

a) Draw a Gantt chart illustrating the order of execution of these processes, showing their completion times.

b) Calculate each process’ waiting time, and then compute the average waiting time for this set.

Note:  waiting time = completion time – arrival time – burst time

=> Write your answers on scratch paper (make sure it is visible) then take a picture of it and upload it here.

In: Computer Science

Given the following business scenario, create a Crow’s Foot ERD using a specialization hierarchy (EER) if...

Given the following business scenario, create a Crow’s Foot ERD using a specialization hierarchy (EER) if appropriate.

Two-Bit Drilling Company keeps information on employees and their insurance dependents. Each employee has an employee number, name, date of hire, and title. If an employee is a full-time inspector, then the date of certification, the renewal date for that certification, and the yearly salary should also be recorded in the system. If an employee is a part-time inspector, then the date of certification, the renewal date for that certification, and the hourly wage should also be recorded in the system. For all employees, the Social Security number and dependent names should be kept. All dependents must be associated with one and only one employee. Some employees will not have dependents, while others will have many dependents.

In: Computer Science

Imagine we have two possibilities: We can scan and email the image, or we can use...

Imagine we have two possibilities: We can scan and email the image, or we can use an optical character reader (OCR) and send the text file. Discuss the advantage and disadvantages of the two approaches in a comparative manner. When would one be preferable over the other?

In: Computer Science

create calculator standard using java language with OOP rule and interfaces.

create calculator standard using java language with OOP rule and interfaces.

In: Computer Science