Questions
what is the concept of token bucket for traffic shaping , computer network, could anyone explain...

what is the concept of token bucket for traffic shaping , computer network, could anyone explain in detail, thanks

In: Computer Science

COMPUTER SCIENCES HOMEWORK Assume it takes 10-6 seconds to do a unit of work. 10 100...

COMPUTER SCIENCES HOMEWORK

Assume it takes 10-6 seconds to do a unit of work.

10 100 1,000 10,000 100,000 1,000,000
n
n2
log10(n)
2n

In each cell in this table put the length of time it would take to complete an algorithm with the given work formula and the given size.

Take the time to represent large numbers in reasonable values; eg. report 109 seconds as 25 hours

PLEASE HELP!!

In: Computer Science

Need the correct line of code for c program to solve  this equation . i is a...

Need the correct line of code for c program to solve  this equation . i is a value that the program all ready calculates from user imput. t

i = (x*1000)+(y*500)+(z*250

In: Computer Science

Create a form in which the user enters two separate numbers (x and y), and when...

Create a form in which the user enters two separate numbers (x and y), and when the user clicks the appropriate button, math functions are performed on these two numbers and output back on to the form.

INPUT

  • User can enter two separate numbers (one for the x variable, and one for the y variable)
  • User can input their information:
    • The user must be able to enter information about themselves, including first name, last name, address, phone

PROCESSING

  • The user will be allowed to click a button (or multiple buttons if desired) on the form
  • Store the user input into two separate variables to be able to perform math
  • Once the button(s) is clicked, several math functions must be performed
    • Adding x and y
    • Subtracting x and y
    • Multiplying x and y
    • Dividing x and y

OUTPUT

  • After the button is clicked and the math functions are performed, the answers to the math problems should be output on the form
    • Addition =
    • Subtraction =
    • Multiplication =
    • Division =
  • Output the data into a listbox
  • Output the data into text box

CRITERIA

  • Make the form visually appealing – use alignment, formatting, spelling, font controls, etc.
  • Must be usable (tab order, adequate labels)
    • Include a clear button so the user can start again
  • Make use of methods we have learned in class
  • Variable names can be creative, but they must include the appropriate prefixes
  • Include access keys on each button
  • Set tab order from top to bottom
  • Include field masking where appropriate
  • Use at least one input box
  • Display at least one output box
  • Include documentation within code
  • Must give accurate information when performing functions
  • Any other special instructions mentioned in Input, Output or Processing section

GRADING

  • Creativity
  • User friendliness of form
  • Use of multiple methods discussed in class
  • Include all criteria listed above

SUBMISSION INSTRUCTIONS

  • Must be submitted to BlackBoard drop box No LATER THAN midnight on the due date

All files should be included in submission

In: Computer Science

How would I write a C++ code that gives me the following out put:    Enter...

How would I write a C++ code that gives me the following out put:

   Enter count of male students: 14

Enter count of female students: 17

Students registered

Total:    31

Male:     14   45.16%

Female:   17   54.84%

   Enter count of male students: 7

Enter count of female students: 2

Students registered

Total:     9

Male:      7   77.78%

Female:    2   22.22%            */

In: Computer Science

The program prompts a user for the number of contestants entered in this year’s and last...

The program prompts a user for the number of contestants entered in this year’s and last year’s Greenville Idol competition, and then it displays the revenue expected for this year’s competition if each contestant pays a $25 entrance fee.

The programs also display a statement that compares the number of contestants each year. Now, replace that statement with one of the following messages:

  • If the competition has more than twice as many contestants as last year, display The competition is more than twice as big this year!

  • If the competition is bigger than last year’s but not more than twice as big, display The competition is bigger than ever!

  • If the competition is smaller than last year’s, display, A tighter race this year! Come out and cast your vote!

Below is the source code.


using System;
using static System.Console;
class GreenvilleRevenue
{
   static void Main()
   {
      const int ENTRANCE_FEE = 25;
      string entryString;
      int numThisYear;
      int numLastYear;
      int revenue;
      bool isThisYearGreater;
      Write("Enter number of contestants last year >> ");
      entryString = ReadLine();
      numLastYear = Convert.ToInt32(entryString);
      Write("Enter number of contestants this year >> ");
      entryString = ReadLine();
      numThisYear = Convert.ToInt32(entryString);
      revenue = numThisYear * ENTRANCE_FEE;
      isThisYearGreater = numThisYear > numLastYear;
      WriteLine("Last year's competition had {0} contestants, and this year's has {1} contestants",
         numLastYear, numThisYear);
      WriteLine("Revenue expected this year is {0}", revenue.ToString("C"));
      WriteLine("It is {0} that this year's competition is bigger than last year's.", isThisYearGreater);
   }
}

Please show output and source code of how to get the displayed text.

In: Computer Science

In this assignment, you are required to write the SQL statements to answer the following queries...

In this assignment, you are required to write the SQL statements to answer the following queries using PostgreSQL system.

The SQL statements comprising the DDL for Henry Books Database are given to you in two files. For that database, answer the following queries. Create the files Q1 to Q10 in PostgreSQL. Do follow the restrictions stated for individual queries.

1. List the title of each book published by Penguin USA. You are allowed to use only 1 table in any FROM clause.

2. List the title of each book that has the type PSY or whose publisher code is JP. You are allowed to use only one condition term in any WHERE clause; i.e., don't use AND/OR boolean operations.

3. List the title of each book that has the type CMP, HIS, or SCI. You are allowed to use only one condition term in any WHERE clause.

4. List the title of each book written by John Steinbeck and that has the type FIC.

5. For each book, list the title (sorted alphabetically), publisher code, type and author names (in the order listed on the cover).

6. How many book copies have a price that is greater than $20 and less than $25?

7. For each publisher, list the publisher name and the number of books published by it, only if the publisher publishes at least 2 books.

8. For each book copy available at the Henry on the Hill branch whose quality is Excellent, list the book's title (sorted alphabetically) and author names (in the order listed on the cover).

9. Create a new table named FictionCopies using the data in the bookCode, title, branchNum, copyNum, quality, and price columns for those books that have the type FIC. You should do this in two steps: 9A) Create the table, and 9B) populate it with the said data.

10. Ray Henry is considering increasing the price of all copies of fiction books whose quality is Excellent by 10%. To determine the new prices, list the bookCode, title, and increased price of every book in Excellent condition in the FictionCopies table. You are not allowed to modify the prices in the table, just show them.

DB1: https://users.cs.fiu.edu/~navlakha/4710/HenryPSQL.sql

DB2: https://users.cs.fiu.edu/~navlakha/4710/HenryInventory.sql

In: Computer Science

Create separate class with these members a, b, c, x, y, z int a b c...

Create separate class with these members

a, b, c, x, y, z

int a b c

float x y z

Demonstrate

1) A two arg float constructor, and a two arg int constructor to instantiate objects, initialize variables read from the keyboard, display the sum.

Note:- Please type and execute this above java program and also give the output for both problems. (Type a java program)

In: Computer Science

2. Show the trace of the RTL code for Booth's algorithm for X = 0111 and...

2. Show the trace of the RTL code for Booth's algorithm for X = 0111 and Y = 1011.

In: Computer Science

Write an Java/C program code to perform known-plaintext attack on Permutation Cipher. This program can be...

Write an Java/C program code to perform known-plaintext attack on Permutation Cipher.
This program can be used to determine the length of the permutation m and the
key permutation.

In: Computer Science

Using draw.io diagram tool, design a database schema for an application that tracks and manages students’...

Using draw.io diagram tool, design a database schema for an application that tracks and manages students’ applications for a university. Make sure to create proper primary key for each entity. Add relations and specify cardinalities.

  • All entities and attributes must be named using the underscore convention. Highlight primary keys in red
  • List any assumptions you have made
  • Use diamonds and the association on the arrow.

  • THINGS TO KEEP IN MIND :

  • The university needs to keep track of students’ application. The application contains information about student: name, address, phone number, DOB, SSN, and generate a unique ID for each student.
  • Education records has to be submitted as well. The education records contain information about previous degrees, GPA, name of school attended and dates ( from – to dates)
  • Test scores are also submitted along with applications. The student can submit more than one test score. The test score consist of test type, date and score.
  • The student should also specify which major they are applying to, for what term
  • The university assign one employee from the admission office to process the application. The employee will handle multiple application at the same time.
  • Applications can be submitted to different departments.

In: Computer Science

Question 1: Write a Java program that prompts the user to input a file name (existing...

Question 1:
Write a Java program that prompts the user to input a file name (existing text file), then calculate and display the numbers of lines in that file. Also calculate and display the length of the longest line in that file. For example, if the input file has the following lines:
Hello
This is the longest line Bye
The output should be:
The file has 3 lines. The longest line is line 2 and it
has 24 characters.
Test your program using the provided files:
./Root/q1.txt
./Root/declaration.txt
./Root/prince.txt

In: Computer Science

In C++ Write a function that took in SIZE and array [size] and counted the number...

In C++ Write a function that took in SIZE and array [size] and counted the number of elements >100

In: Computer Science

Define what an array index value is in JAVA. Then, write a JAVA program that passes...

Define what an array index value is in JAVA. Then, write a JAVA program that passes an array to a method and finds the average value or mean value (add up the numbers in the array and divide by the number of values) of the array and prints it out.

In: Computer Science

Hello I'm currently having an error that says "main is not abstract and does not override...

Hello I'm currently having an error that says "main is not abstract and does not override abstract method" is there a way to fix the error?

import java.io.IOException;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;
import static javafx.application.Application.launch;
import javafx.scene.layout.StackPane;
public class Main extends Application implements EventHandler<ActionEvent>{
    public static void main(String[] args){
        launch(args);
    }
    @Override
    public void Start(Stage stage){
        stage.setTitle("Test");
        Button calcButton = new Button("Steam");
      
        StackPane root = new StackPane();
        calcButton.setOnAction(this);
      
        Scene scene = new Scene(root, 100, 100);
      
        stage.setScene(scene);
        stage.setTitle("Test");      
        stage.show();

    }
    class CalcButtonHandle {
      
        public void handle(ActionEvent event) throws IOException
        {
        Main fo = new Main();
        fo.runOt("D:\\Steam\\Steam.exe");
        }
    }
  
    public void runOt(String path) throws IOException{
        Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path);
    }
}
  

In: Computer Science