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 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 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:
The submission for this assignment should include the following artifacts:
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 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 |
|
The network address of 172.16.0.0/20 provides how many subnets and hosts? |
|
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? |
|
On a VLSM network, which mask should you use on point-to-point WAN links to reduce the waste of IP addresses? |
In: Computer Science
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)
Which IP addresses are valid for hosts belonging to the 10.1.160.0/20 subnet? (Choose three)
Which one of the following IP addresses is the last valid host in the subnet using mask 255.255.255.192?
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)
In: Computer Science
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
In: Computer Science
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?
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?
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?
Identify how many valid host addresses can you have on 192.168.27.32 network with a subnet mask of 255.255.255.240.
In: Computer Science
In: Computer Science
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 drawbacks of evaluation?
In: Computer Science
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 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
In: Computer Science
(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