Questions
I am getting the following error: SalaryCalc.java:41: error: variable shift might not have been initialized if(shift==0)...

I am getting the following error: SalaryCalc.java:41: error: variable shift might not have been initialized if(shift==0) ^ 1 error

Please FIX

This is my Java code:

import java.util.Scanner;
public class SalaryCalc
{
double Rpay=0, Opay=0;
void calPay(double hours, double rate){
if(hours<=40){
Rpay = hours * rate;
Opay = 0;
}
else {
double Rhr,Ohr;
Rhr = 40;
Ohr = hours-Rhr;
Rpay = Rhr * rate;
Opay = Ohr * (1.5*rate);
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String name;
int shift;
Double rate, hours;
System.out.println("Pay Calculator");
System.out.println("Enter Your Name");
name=sc.next();
System.out.println("Enter Your Shift, Enter 0 for Day, Enter1 for Night");
System.out.println("0=Day, 1= Night");
System.out.println("Enter Number of Hours Worked");
hours=sc.nextDouble();
System.out.println("Enter Hourly Pay");
rate=sc.nextDouble();
SalaryCalc c= new SalaryCalc();
c.calPay(hours,rate);
Double Tpay= c.Rpay+ c.Opay;
System.out.println();
System.out.println("Calculate Pay");
System.out.println("Employee Name: "+name);
System.out.println("Employee Regular Pay: "+c.Rpay);
System.out.println("Employee Overtime Pay: "+c.Opay);
System.out.println("Employee Total Pay: "+Tpay);
if(shift==0)
{
System.out.println("Employee PayPeriod is Friday");
}
else{
System.out.println("Employee PayPeriod is Saturday");
}
}

}

In: Computer Science

In C++ for netbeans. Use a 1 dimensional array object to create a 2 dimensional table...

In C++ for netbeans.

Use a 1 dimensional array object to create a 2 dimensional table object. Then modify to create a triangular table.

Objective -> create an array of dynamic objects of RowAray inside Table i.e. an Aggregate. See Specs RowAray.h, Table.h Then create a triangular table, i.e. Triangle.

Fill each cell with random 2 digit integers. The example Table has 8 columns of RowAray objects each filled with 6 rows of random 2 digit numbers.

Then create a triangular table using the concept of the original table.

Complete the class implementations RowAray.cpp, Table,cpp, and Triangle.cpp use the driver program, obtain similar results.

https://github.com/ml1150258/2019_Fall_CSC-CIS_17c/tree/master/Hmwk/Review1_CSC17c_Object_Array

When complete for #rows=#cols, then create a version 2 that does a random number of cols per row with sorted column size output like the first assignment for the Triangular Matrix.

We will augment this assignment later and progress to templates.

In: Computer Science

For this assignment, pretend you have been hired by a school district to create an application...

For this assignment, pretend you have been hired by a school district to create an application enabling access to educational videos freely available on the Internet.

For examples of places where these videos are available, check out this page:

https://www.refseek.com/directory/educational_videos.html (Links to an external site.).

For this assignment, you are responsible for developing a database schema (both conceptual and physical) to support this application. The schema must support the following application features:

  1. It should be possible to efficiently search the application for videos, filtering on the following characteristics:
    • Title (required)
    • Keywords (note that a video may have multiple keywords)
    • Length of Video (required)
    • Appropriate Grade Level (optional)
    • Video Source (i.e. which of the sites referenced on the page above houses the video. required.)
  2. It should be possible for teachers to comment on videos. Each comment should have the following fields:
    • Timestamp (required)
    • Name of teacher (optional)
    • Rating (1 to 5 stars, optional)
    • Text of comment (required)

The submission for this assignment should include the following artifacts:

  • An entity-relationship diagram for the conceptual schema. You can do this on paper or whiteboard and submit a photograph, or do it using diagramming software and submit a screen shot or PDF. (Please do not submit a file in the diagramming software's native format.)
  • A physical schema in the form of SQL CREATE TABLE statements. Please submit the SQL and not the database file (or files) itself.
  • SQL INSERT statements creating at least 3 sample video records, each of which should have at least 2 keywords. Note that you will need to insert into multiple tables for each record if the assignment was done correctly.

This assignment can be completed adequately using as few as four tables. Your schema may end up with more tables and that is fine, but if you end up with more than 7-8 tables there is a good chance you are overthinking things.

In: Computer Science

Please explain answer and show steps if possible A new network is being designed for your...

Please explain answer and show steps if possible

A new network is being designed for your company, Acme, Inc. If you use a Class C IP network, which subnet masks will provide one usable subnet per department while allowing enough usable host addresses for each department specified in the table? (Choose three)

Department

Number of Users

Corporate

60

Customer Support

62

Financial

25

HR

5

Engineering

4

  1. 255.255.255.0
  2. 255.255.255.128
  3. 255.255.255.192
  4. 255.255.255.224
  5. 255.255.255.240
  6. 255.255.255.248
  7. 255.255.255.252

The network address of 172.16.0.0/20 provides how many subnets and hosts?

  1. 7 subnets, 30 hosts each
  2. 16 subnets, 8,190 hosts each
  3. 16 subnets, 4,094 hosts each
  4. 7 subnets, 2,046 hosts each

You need to configure a server that is on the subnet 192.168.19.24/29. The router has the last available host address. Which of the following should you assign to the server?

  1. 192.168.19.0 255.255.255.0
  2. 192.168.19.33 255.255.255.240
  3. 192.168.19.26 255.255.255.248
  4. 192.168.19.30 255.255.255.248

On a VLSM network, which mask should you use on point-to-point WAN links to reduce the waste of IP addresses?

  1. /27
  2. /30
  3. /28
  4. /29

In: Computer Science

please debug this so that it will compiler: C# // Uses PrintWebAddress method three times using...

please debug this so that it will compiler: C#

// Uses PrintWebAddress method three times
using System;
public class DebugSix2
{
   public void Main()
   {
      PrintWebAddress();
      Console.WriteLine("Shop at Shopper's World");
      PrintWebAddresses();
      Console.WriteLine("The best bargains from around the world");
      PrintWebAddress;
   }
   public void PrintWebAddress()
   {
      Console.WriteLine(------------------------------");
      Console.WriteLine(Visit us on the web at:");
      Console.WriteLine(www.shoppersworldbargains.com");
      Console.WriteLine(******************************");
   }
}

In: Computer Science

Please explain answer and show steps Which two statements describe the IP address 10.16.3.65/22? (Choose two)...

Please explain answer and show steps

Which two statements describe the IP address 10.16.3.65/22? (Choose two)

  1. The subnet address is 10.16.3.0 255.255.252.0.
  2. The lowest host address in the subnet is 10.16.0.1 255.255.252.0.
  3. The last valid host address in the subnet is 10.16.3.255 255.255.252.0
  4. The broadcast address of the subnet is 10.16.3.255 255.255.252.0.
  5. The network is not subnetted.

Which IP addresses are valid for hosts belonging to the 10.1.160.0/20 subnet? (Choose three)

  1. 10.1.169.0
  2. 10.1.176.1
  3. 10.1.175.254
  4. 10.1.160.0
  5. 10.1.175.255
  6. 10.1.160.255

Which one of the following IP addresses is the last valid host in the subnet using mask 255.255.255.192?

  1. 192.168.2.60
  2. 192.168.2.61
  3. 192.168.2.62
  4. 192.168.2.63
  5. 192.168.2.32

An administrator is working with the 192.168.4.0 network, which has been subnetted with a /27 mask. Which two addresses can be assigned to hosts within the same subnet? (Choose two)

  1. 192.168.4.30
  2. 192.168.4.31
  3. 192.168.4.32
  4. 192.168.4.33

In: Computer Science

Brief Introduction Suppose that you are an analyst for the ABC Company, a large consulting firm...

Brief Introduction

Suppose that you are an analyst for the ABC Company, a large consulting firm with offices around the world. The company wants to build a new knowledge management system that can identify and track the expertise of individual consultants anywhere in the world on the basis of their education and the various consulting projects on which they have worked. Assume that this is a new idea that has never before been attempted in ABC or elsewhere. ABC has an international network, but the offices in each country may use somewhat different hardware and software. ABC management wants the system up and running within a year.

Action Items

  • Given the situation, what methodology would you recommend that ABC Company use? Why?
  • Support or Oppose the above statements with arguments
  • Respond to two other class member postings: observe and criticize their statements

In: Computer Science

Please explain answer and show steps If your current Network ID is 223.40.35.0 with the default...

Please explain answer and show steps

If your current Network ID is 223.40.35.0 with the default subnet mask and you need to have 15 subnets and maximizing the number of valid node IP addresses what would be the most appropriate subnet mask?

  1. 255.255.224.0
  2. 255.255.255.224
  3. 255.255.240.0
  4. 255.255.255.240

Given the following IP address from the Class B address range using the default subnet mask: 100.110.0.0. Your network plan requires no more than 64 hosts on a subnet. When you configure the IP address in Cisco IOS software, which value should you use as the subnet mask?

  1. 255.255.0.0
  2. 255.255.128.0
  3. 255.255.255.128
  4. 255.255.255.252

Given an IP address of 131.107.2.104 and a subnet mask of 255.255.255.224, which of the following is the other form of representing this address?

  1. 131.107.2.104/26
  2. 131.107.2.104/24
  3. 131.107.2.104/25
  4. 131.107.2.104/27
  5. 131.107.2.104/19

                                   

Identify how many valid host addresses can you have on 192.168.27.32 network with a subnet mask of 255.255.255.240.  

  1. (2^4) - 2
  2. (2^3) – 2
  3. (2^2) - 2
  4. (2^1) – 2

In: Computer Science

1. Write an algorithm to calculate the Matrix multiplication (or write with pseudo code) 2. Write...

1. Write an algorithm to calculate the Matrix multiplication (or write with pseudo code)
2. Write an algorithm to calculate the recursive Matrix multiplication (or write with pseudo code)
3. Find the time complexity of your pseudo code and analyze the differences

In: Computer Science

Please debug this by fixing all the mistakes so it will compile in C# // Program...

Please debug this by fixing all the mistakes so it will compile in C#



// Program prompts user for any number of values
// (up to 20)
// and averages them

using System;
public class DebugFive04
{
    public static void Main()
    {
        const int QUIT = 999;
        int[] numbers = new int[20];
        int x;
        int num;
        double average;
        double total;
        string inString; // intString
        Console.Write("Please enter a number or " +
           QUIT + " to quit...");
        inString = Console.ReadLine();
        num = Convert.ToInt32(inString); // inString
        x = 0;
        while ((x < numbers.Length))
        {
            numbers[x] = num;
            ++x;
            total = +numbers[x]; // =+ not +=
            Console.Write("Please enter a number or " +
               QUIT + " to quit...");
            inString = Console.ReadLine();
            numbers = Convert.ToInt32(inString);
        }
        Console.WriteLine("The numbers are:");
        for (int y = 0; y < x; ++y)
            Console.Write("{0,6}", numbers[y]);
        average = total / numbers.Length;
        Console.WriteLine();
        Console.WriteLine("The average is {0}", average);
    }
}

In: Computer Science

1) What are the values of doing formal evaluation? 2) What do you see as the...

1) What are the values of doing formal evaluation?

2) What do you see as the drawbacks of evaluation?

In: Computer Science

Mark Arnez of Aspen consulting has been contacted by a client who represents an international company...

Mark Arnez of Aspen consulting has been contacted by a client who represents an international company with locations in your city, in Toronto, and in London. Each location has a plant for making parts for boilers used in large buildings. There also are sales and parts distribution offices at the plants. All buildings currently are networked using 10-Mbps communications to each workstation or server and 100-Mbps communications between floors. The client is exploring ways to link the business networks at all three locations. Form a team to determine the best way to connect the locations. Use the internet to research some gross estimates of the costs.

In: Computer Science

3-1. On your first visit with gray sharma, he tells you he would like to know...

3-1. On your first visit with gray sharma, he tells you he would like to know about some basic network designs. use microsoft paint or another drawing package to draw examples of the basic network topologies for gray. then, use the space below to summarize those topologies.

Explain the advantages and disadvantages of the topologies you summarized for gray in Assignment 3-1. Based on what you know at this point, which topology would you recommend for the physicians building? why would you recommend it?

In: Computer Science

Write a Java class. The class name must be ShapeMetrics, which means the file name must...

Write a Java class. The class name must be ShapeMetrics, which means the file name must be ShapeMetrics.java. Provide the following functions:
1. getAreaOfRectangle(), with two float arguments, width and height, in that order, returning a float value which is the area of the rectangle with that width and height.
2. getSpaceDiagonalOfRectangularCuboid (), with three float arguments, width, height, and depth, in that order, returning a float value which is the length of the diagonal line which bisects the cuboid.
3. getRadiusOfCircle(), with two float arguments, chord and sagitta, in that order, returning a float value that is radius of the circle.
4. getCircumferenceOfEllipse(), with two float arguments, the major axis and minor axis respectively, returning a float value which is the circumference of the ellipse.
5. getVolumeOfCylinder(), with float arguments radius and height, in that order, returning a float value that is the volume of the cylinder.
All functions must be public and static. Do not put a main() function or any println() statements in your class. They are not needed.
Common pitfalls:
• Using the wrong name for the class or the functions. Remember, case counts.
• Returning the wrong data type from a function.
• Failure to follow instructions.

• Poor formatting. This is a sign of sloppiness and the beginning of a bad habit. Always take the time to format your code, using indentation and helpful variable names.
• Failing to use the test harness to check your work. If your solution provides numbers similar to those posted below, then you will get a good grade. If your solution fails to work with the test harness, or if you just ignore the test harness entirely, you risk losing points because of silly, preventable mistakes. Trust me, I’ve seen this happen too many times.
Here is output from a test harness. Use of the posted test harness is highly encouraged, but not required.
The area of the rectangle with width 3.7 and height 2.1 is: 7.77. The space diagonal of the cuboid with width 3.7 and height 2.1 and depth 8.8 is: 9.77
The radius of the circle with chord 2.1 and sagitta 0.04 is: 13.80 The circumference of the ellipse with major axis 2.5 and minor axis 2.0 is: 7.09
The volume of the cylinder with radius 8.8 and height 2.1 is: 510.90

In: Computer Science

(C++) Write a program that prompts the user for the length of one side of a...

(C++) Write a program that prompts the user for the length of one side of a triangle and the sizes of the two adjacent angles in degrees and then displays the length of the two other sides and the size of the third angle.

In: Computer Science