Answer:
Follows are the code to the given question:
public class Employee //defining a class Employee
{
String first_name,last_name;
Double monthly_salary;
Employee(String first_name,String last_name,Double monthly_salary)
{
this first_name=f_name// initialize value in first_name
this last_name = l_name; // initialize value in the last_name
this monthly_salary = m_salary; // initialize value in the monthly_salary
if (monthly_salary < 0.0)//use if to check monthly_salary is positive
monthly_salary = 0.0;//set value 0
}
void setfirst_name (String f_name)//defining set method to store first_name
{
first_name = f_name; //holding the value of first_name
}
public String getfirst_name ()//defining get method to return first_name
{
return first_name;//return first_name
}
public void setlast_name (String l_name)//defining set method to store last_name
{
last_name = l_name; // holding the value of the last_name
}
public String getlast_name ()//defining get method to return last_name
{
return last_name;//return last_name
}
public void setmonthly_salary(double m_salary)//defining set method to store monthly_salary
{
monthly_salary = m_salary; // holding the value of the monthly_salary
}
public double getmonthly_salary ()//defining get method to return monthly_salary
{
return monthly_salary;//return monthly_salary
}
}
Explanation:
In this code, a class "Employee" is declared that defines two string variables "first_name,last_name", and one double variable "monthly_salary". In the next step, a parameterized constructor is defined that stores the value into the variable, and use if block to check "monthly_salary" is a positive. It also uses the getter and setter method to hold and return its value.
3. Given the following total revenue functions, find the corresponding demand functions:
a) TR = 50Q-4Q²
b) TR = 10
a)TR=50Q4Q2 I hope.this helps
A) The demand function for the total revenue function TR = 50Q - 4Q² is;
P = 50 - 4Q
B) The demand function for the total revenue function TR = 10 is; 10/Q
We are given total revenue functions as;
TR = 50Q - 4Q²
TR = 10
A) TR = 50Q - 4Q²
Formula for revenue function if Q represents the units demanded is;
TR = P × Q
Where P is the demand function
Thus;
50Q - 4Q² = PQ
Divide both sides by Q to get the demand function;
P = 50 - 4Q
B) TR = 10
Formula for revenue function if Q represents the units demanded is;
TR = P × Q
Where P is the demand function
Thus;
10 = P × Q
Divide both sides by Q to get the demand function;
P = 10/Q
Read more at;https://brainly.com/question/13701068
Are items a through e in the following list algorithm? If not, what qualities required of algorithms do they lack?
a. Add the first row of the following matrix to another row whose first column contains a nonzero entry. (Reminder: Columns run vertically; rows run horizontally.)
[1 2 0 4 0 3 2 4 2 3 10 22 12 4 3 4]
b. In order to show that there are as many prime numbers as there are natural numbers, match each prime number with a natural number in matching the first prime number with 1 (which is the first natural number) and the second prime number with 2, the third with 3, and so forth. If, in the end, it turns out that each prime number can be paired with each natural number, then it is shown that there are as many prime numbers as natural numbers.
c. Suppose you're given two vectors each with 20 elements and asked to perform the following operation. Take the first element of the first vector and multiply it by the first clement of the second vector. Do the same to the second elements, and so forth. Add all the individual products together to derive the dot product.
d. Lynne and Calvin are trying to decided who will take the dog for a walk. Lynne suggests that they flip a coin and pulls a quarter out of her pocket. Calvin does not trust Lynne and suspects that the quarter may be weighted (meaning that it might favor a particular outcome when tossed) and suggests the following procedure to fairly determine who will walk the dog.
1. Flip the quarter twice.
2. If the outcome is heads on the first flip and tails on the second, then I will walk the dog.
3. If the outcome is tails on the first flip, and heads on the second, then you will walk the dog.
Answer:
Following are the responses to the given points:
Explanation:
The following features must contain a well-specified algorithm:
Description [tex]\to[/tex] Exact measures described
Effective computation [tex]\to[/tex] contains steps that a computer may perform
finitude [tex]\to[/tex] It must finish algorithm.
In choice "a", there is little algorithm Because it does not stop, finiteness has already been incomplete. There is also no algorithm.
In choice "b", it needs productivity and computational burden. because it's not Enter whatever the end would be.
In choice "c", the algorithm is given the procedure. It fulfills all 3 algorithmic properties.
In choice "d", each algorithm is a defined process. Since it needs finitude.
1, How can technology serve to promote or restrict human rights? [2 points]
Answer:
Examples of how technology can be used as a powerful tool for human rights are ever expanding. Newer technologies such as artificial intelligence, automation, and blockchain have the potential to make significant positive contributions to the promotion and protection of human rights.
Was Nick Carson a good project manager? Why or why not?
Answer:
Nick Carson is not a good project manager because he did not focus on all aspects of the project. He also failed to provide accurate schedules and also detailed plans on the happenings of the project. He was performing other jobs leaving aside the work of project manager. Without concerning and understanding the problem of top management he delivered the project.
Explanation:
the _ and _ services help us to keep in touch with our family and friends
Answer:
Internet and communication technology
I need help Asap!!! So the question is "Compare and contrast Web page and Websites".
Answer:
A website is a mix of web pages while a web page is a single entity.
Explanation:
Methods ii.) Define and implement a method that takes a string array as a parameter and returns the length of the shortest and the longest strings in the array i.) Write a method that take an integer array as a parameter and returns the sum of positive odd numbers and sum of positive even numbers. iii.) Implements the sequential search method that takes and array of integers and the item to be search as parameters and returns true if the item to be searched in the array, return false otherwise
Answer:
Explanation:
Well I am sorry I don't know the answer anyway.
25 POINTS PLATO
Drag the tiles to the boxes to form correct pairs.
Pat creates a table in a spreadsheet program, starting at cell A1 and ending at cell B4. Column A contains words, while column B contains the words’ meanings. Pat wants to look up the meaning of the word "paramount", which is present in cell A3. How should Pat write the LOOKUP function? Refer to the syntax of the function and match the arguments in the syntax to their values.
Syntax: LOOKUP(lookup value; search table; result table)
B1:B4
"paramount"
A1:A4
lookup value
search table
result table
Answer:
lookup value = "paramount"
Search table = A1:A4
Result table = B1;B4
Explanation:
lookup, what are we looking up.....:::///????Paramount
What is the beginning search table......A1;A4
Column B contains the words meanings.....this is the result we want:
So the Result table......B1:B4
LOOKUP("paramount"; B1:B4; A1:A4) should Pat write the LOOKUP function.
What is a LOOKUP function?Lookup functions entail accessing a cell, comparing its values to those in an adjacent row or column, and then extracting the relevant answers from the associated columns or rows of Excel.
The lookup value, the search table, and indeed the result table are the three inputs required by the LOOKUP function. The value you are searching for, in this case, "paramount," is the lookup value.
The table that contains the lookup value, throughout this example B1:B4, is known as the search table.
The table where the results of the lookup are stored is known as the result table, and in this example, A1:
Pat should use the columns which would have the cell value of B1, B4 as well as A1.
Learn more about the LOOKUP function, here:
https://brainly.com/question/29517410
#SPJ3
Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following methods in the program: calcAverage: This method should accept five test scores as arguments and return the average of the scores. determineGrade: This method should accept a test score as an argument and return a letter grade for the score, based on the following grading scale:
Answer:
See comment for complete question
#include <iostream>
using namespace std;
double calc_Average(double sc1, double sc2, double sc3, double sc4, double sc5){
return (sc1 + sc2 + sc3 + sc4 + sc5)/5;
}
char determine_Grade(double score){
char grade;
if(score >= 90 && score <=100){
grade = 'A';}
else if(score >= 80 && score <90){
grade = 'B';}
else if(score >= 70 && score <80){
grade = 'C';}
else if(score >= 60 && score <70){
grade = 'D';}
else if(score <60){
grade = 'F';}
return grade;
}
int main(){
double sc1,sc2, sc3, sc4, sc5;
cout<<"Enter 5 scores: ";
cin>>sc1>>sc2>>sc3>>sc4>>sc5;
cout<<"Score: "<<sc1<<" Grade: "<<determine_Grade(sc1)<<endl;
cout<<"Score: "<<sc2<<" Grade: "<<determine_Grade(sc2)<<endl;
cout<<"Score: "<<sc3<<" Grade: "<<determine_Grade(sc3)<<endl;
cout<<"Score: "<<sc4<<" Grade: "<<determine_Grade(sc4)<<endl;
cout<<"Score: "<<sc5<<" Grade: "<<determine_Grade(sc5)<<endl;
double Ave = calc_Average(sc1,sc2,sc3,sc4,sc5);
cout<<"Average: "<<Ave<<" Grade: "<<determine_Grade(Ave)<<endl;
return 0;
}
Explanation:
The program was written in C++. Because of the length of the explanation, I've added the explanation as an attachment where I used comments to explain the lines of the code.
You are going on vacation and want to take some work files. You need a storage device that is small enough to fit in your bag and preferably one that does not have plugs. Which device should you bring?
hard drive bus
flash drive
external hard drive
storage card
Answer:
Flash drive
Explanation:
We are supposed to go to the concert tomorrow, but it has been raining for three days straight. I just know that we won’t be able to go.
7. What is the author’s tone?
Its the worried tone
Hope this helps!
There Will Come Soft Rains is a warning story about nuclear war and how, in the end, technology won't keep us safe. In response to the atomic bombings of Hiroshima and Nagasaki, Bradbury penned the tale.
What author’s worried tone indicate about rain?Ray Bradbury wrote the classic science fiction short tale “There Will Come Soft Rains” in 1950. The narrative is narrated in a detached, emotionless tone, as though the events that are taking place are a normal part of everyday life.
The story's meaning can be found in the story's complete lack of human beings, not even corpses.
Soft rain rays will appear in the short story. Bradbury creates a disorganized, somewhat post-apocalyptic atmosphere. To better understand the zeitgeist of the world, he employs a variety of literary techniques.
Therefore, It's the worried tone author’s.
Learn more about author’s here:
https://brainly.com/question/1308695
#SPJ5
Output devices include:
A) Printers, and Monitors
B) CPU
C) System Unit
D) None of the above
Answer:
CPU IS TH ANSWER BECAUSE IT IS OUT
when working with smart which tab would provide the ability to change the shape or size of the smart art shapes
Answer:
B) Format
Explanation:
Write code to take two words from the user. The program should convert these to lower case, then compare them: printing a positive number if string1 appears after string2 alphabetically, a negative number if string1 appears before string2 alphabetically and zero if the two strings are identical. Make sure your program does not produce any additional numerical output other than this number or it may not be graded correctly.
Answer:
Use compareTo.
Explanation:
import java.util.Scanner;
public class U2_L3_Activity_Three{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.println("Enter first word: ");
String word1 = scan.nextLine();
System.out.println("Enter second word: ");
String word2 = scan.nextLine();
//I had to make the string all lowercase or all uppercase for when I did this
word1 = word1.toLowerCase();
word2 = word2.toLowerCase();
System.out.println("Result: " + word1.compareTo(word2));
}
}
Following are the program to converting string value into lowercase and compare with an input string value.
Program Explanation:
Import package.Defining a class Dat.Inside the class defining the main method, and in the method, two string variable "string1, string2" is declared.After input, the value a "toLowerCase" method is used that converts string value into lower case. After converting value into the lower case a "compareTo" method is used that compares value and prints its value.Program:
import java.util.*;//import package for input
public class Dat //defining a Dat
{
public static void main(String[] ax)//main method
{
String string1 ,string2; //defining String variable
Scanner sc = new Scanner(System.in);//creating Scanner class object to input value
System.out.println("Enter values: ");//print message
string1= sc.next();//input value
string2= sc.next();//input value
string1= string1.toLowerCase();//convert string value into LowerCase
string2 = string2.toLowerCase();//convert string value into LowerCase
System.out.println("Result: " + string1.compareTo(string2));//using compareTo method
}
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/15706308
Write the definition of the function inputArray that prompts the user to input 20 numbers and stores the numbers into alpha. Write the definition of the function double Array that initializes the elements of beta to two times the corresponding elements in alpha. Make sure that you prevent the function from modifying the elements of alpha. Write the definition of the function copy AlphaBeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. Make sure that you prevent the function from modifying the elements of alpha and beta. Write the definition of the function printArray that prints any one-dimensional array of type int. Print 15 elements per line.
Answer:
In Java:
public static int[] inputArray(){
Scanner input = new Scanner(System.in);
int[] alpha = new int[20];
for(int i = 0;i<20;i++){
alpha[i] = input.nextInt();
}
return alpha;}
public static int[] doubleArray(int [] alpha){
int[] beta = new int[20];
for(int i = 0;i<20;i++){
beta[i] = 2 * alpha[i];
}
return beta;
}
public static int[] copyAlphaBeta(int [] alpha, int [] beta){
int [] AlphaBeta = new int[10];
for(int i = 0;i<5;i++){
AlphaBeta[i] = alpha[i];
}
int count = 5;
for(int i = 15;i<20;i++){
AlphaBeta[count] = beta[i];
count++;
}
return AlphaBeta;
}
public static void printArray(int [] alpha){
for(int i = 0;i<20;i++){
System.out.print(alpha[i]+" ");
if((i+1)%15 == 0){
System.out.println(" ");
}
}
}
Explanation:
The inputArray is defined here
public static int[] inputArray(){
Scanner input = new Scanner(System.in);
This declares alpha array of 20 elements
int[] alpha = new int[20];
The following iteration gets input from the user into the array
for(int i = 0;i<20;i++){
alpha[i] = input.nextInt();
}
This returns the alpha array
return alpha;}
The doubleArray is defined here. It takes the alpha array as its input parameter
public static int[] doubleArray(int [] alpha){
This declares beta of 20 integers
int[] beta = new int[20];
This populates beta by 2 * alpha[i]
for(int i = 0;i<20;i++){
beta[i] = 2 * alpha[i];
}
This returns the alpha array
return beta;}
The copyAlphaBeta array is defines here
public static int[] copyAlphaBeta(int [] alpha, int [] beta){
This declares AlphaBeta as 10 elements
int [] AlphaBeta = new int[10];
This populates the first 5 elements of AlphaBeta with the first 5 of alpha
for(int i = 0;i<5;i++){
AlphaBeta[i] = alpha[i];
}
int count = 5;
This populates the last 5 elements of AlphaBeta with the last 5 of beta
for(int i = 15;i<20;i++){
AlphaBeta[count] = beta[i];
count++;
}
This returns the AlphaBeta array
return AlphaBeta;
}
The printArray is defined here. It takes the alpha array as its input parameter
public static void printArray(int [] alpha){
This iterates through alpha array
for(int i = 0;i<20;i++){
This prints each element of the array
System.out.print(alpha[i]+" ");
A new line is started after the 15th element
if((i+1)%15 == 0){
System.out.println(" ");
}
}
}
See attachment for complete program which includes the main