Questions
Find an article about an intellectual property issue that has occurred recently and discuss it with...

Find an article about an intellectual property issue that has occurred recently and discuss it with two references.

In: Computer Science

Correct C++ function and main files separately for the following question and its subparts. 1-aGiven a...

Correct C++ function and main files separately for the following question and its subparts.

1-aGiven a matrix of integers, count the amount of times each number 0-9 appears. Print out your results on one line in the following form:

0:number of zeros;1:number of ones;2:number of twos;3:number of threes;4:number of fours;5:number of fives;6:number of sixes;7:number of sevens;8:number of eights;9:number of nines;

For example, if you are passed an identify matrix, it contains 12 zeros and 4 ones and no other numbers from 0 to 9, your output would be:

0:12;1:4;2:0;3:0;4:0;5:0;6:0;7:0;8:0;9:0;

Note the colons and semi-colons.

Signature: void count_numbers(int array[4][4])

1-b Given a matrix, print out the scaled version of the matrix, where you multiply every element in the matrix by the same numeric value. Elements should be printed by row, with a space separating elements on a row, and a newline character separating rows.

Example:

int scale = 3 ;
int threebythree[3][3] = {{0,1,2},{3,4,5},{6,7,8}} ;
print_scaled_matrix(threebythree,scale) ;

This should produce the following output:

0 3 6
9 12 15
18 21 24
Signature: void print_scaled_matrix(int array[3][3],int scale)

1-c Given two two-dimensional arrays, add them together and print the result as in 1-b above. What relationship needs to be between the sizes of the two matrices?

Example:

int matrix1[3][3] = {{0,1,2},{3,4,5},{6,7,8}} ;
int matrix2[3][3] = {{0,0,0},{2,2,2},{-5,-4,8}} ;
print_summed_matrices(matrix1,matrix2) ;

This should produce the following output:

0 1 2
5 6 7
1 3 16
Signature: void print_summed_matrices(int array1[3][3],int array2[3][3])

In: Computer Science

Summary Three employees in a company are up for a special pay increase. You are given...

Summary

Three employees in a company are up for a special pay increase. You are given a file, say Ch3_Ex5Data.txt, with the following data:

Miller Andrew 65789.87 5

Green Sheila 75892.56 6

Sethi Amit 74900.50 6.1

Each input line consists of an employee’s last name, first name, current salary, and percent pay increase.

For example, in the first input line, the last name of the employee is Miller, the first name is Andrew, the current salary is 65789.87, and the pay increase is 5%.

Instructions

Write a program that reads data from a file specified by the user at runtime (i.e. your program should accept the filename as user input) and stores the output in the file Ch3_Ex5Output.dat. To test your program, use the Ch3_Ex5Data.txt   file.

Your program will not pass all checks if it does not accept a filename as input from the user.

For each employee, the data must be output in the following form: firstName- (Adam) lastName- (Zeb) updatedSalary.

Format the output of decimal numbers to two decimal places.

Since your program handles currency, make sure to use a data type that can store decimals.

In: Computer Science

Please no Plagiarism Steganography: Different type of algorithms, implementations, and write classic algorithms.

Please no Plagiarism

Steganography:

Different type of algorithms, implementations, and write classic algorithms.

In: Computer Science

PHP 1. What is an “all-in-one” form and when should it be used? 2. When would...

PHP

1. What is an “all-in-one” form and when should it be used?

2. When would you use the $_SERVER['SCRIPT_NAME'] autoglobal?

In: Computer Science

USE PYTHON : # Problem Set 04: - Write a function to seek for all even...

USE PYTHON :

# Problem Set 04:
- Write a function to seek for all even numbers and odd numbers in the middle of two number A and B. Print even and odd numbers in 1 and 2020 (including both these two numbers)

# Problem Set 05:
- A website requests an user to input his account password.
- Write a program to examize the validity of the password.
- The valid password must consists of:
- At least 1 letter in [a-z]
- At least 1 number in [0-9]
- At least a letter in [A-Z] (capital)
- At least one special letter in [$#@]
- At least 6 letters in total
- At most 12 letters in total
- The program can accept a list of passwords that are split by commas.
- Print all valid passwords in a line and split by commas
- Examples:
- Input: ABd1234@1,a F1#,2w3E*,2We3345
- Output: ABd1234@1

In: Computer Science

(c++) error: =================== MISMATCH FOUND ON LINE 0007: ===================                             

(c++) error:

=================== MISMATCH FOUND ON LINE 0007: ===================                                         

ACTUAL  : 2~year                                                                                             

EXPECTED: 2~years                                                                                            

======================================================

#include <iostream>
using namespace std;

int main()
{
const int MonthDays[]= { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30 ,31 };
const string MonthName[]= {"jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"};
  
int day;
int year=0;
int index;
  
while(1)
{
cout<<"Please enter a day of the year (0 to exit): ";
cin>>day;
cout<<day<<endl;
  
if(day==0)
{
break;
}
  
index=0;
year=0;
while(day>365)
{
day=day-365;
year++;
}
  
if(year !=0)
{
cout<<year<<" year"<<endl;
}
  
index=0;
while(day>MonthDays[index])
{
day=day-MonthDays[index];
index++;
}
cout<<MonthName[index]<<" "<<day<<endl;
}
  
cout<<"Thanks for playing!";
  
return 0;
}

INSTRUCTIONS:

Given a number, calculate how many years into the future it is, and what date. Assume no leap years. For example: Please enter a day of the year (0 to exit): 1 jan 1 Please enter a day of the year (0 to exit): 365 dec 31 Please enter a day of the year (0 to exit): 366 1 year jan 1 Please enter a day of the year (0 to exit): 0 Thanks for playing!

In: Computer Science

In JAVA : There are two text files with the following information stored in them: The...

In JAVA :

There are two text files with the following information stored in them:

The instructor.txt file where each line stores the id, name and affiliated department of an instructor separated by a comma The department.txt file where each line stores the name, location and budget of the department separated by a comma

You need to write a Java program that reads these text files and provides user with the following menu:

1. Enter the instructor ID and I will provide you with the name of the instructor, affiliated department and the location of that department.

2. Enter the department name and I will provide you with the location, budget and names of all instructors that work for the department.

3. Insert a record about a new instructor.

4. Exit

The above menu should continue to be displayed in a loop until the user selects option 4.

When the user selects option 1 above, the following should be displayed:

Enter the instructor ID:

If the user enters an instructor id that is not present in the text file, display "The ID doesnot appear in the database.", otherwise, display the name of the instructor, affiliated department and the location of that department.

When the user selects option 2 above, the following should be displayed:

Enter the department name:

If the user enters a name that is not present in the text file, display "The department name doesnot appear in the database.", otherwise, display the location, budget and names of all instructors that work for the department.

If the user selects option 3 above, display the following:

Enter the instructor id:

Enter the instructor name:

Enter the affiliated department name:

Once the user enters the above information, store the information in the instructor file only if the following two conditions are met: 1. The department already exists in the department file. If not, display "The department doesnot exist and hence the instructor record cannot be added to the database". 2. The instructor id should not already be present in the file. If so, display "Instructor id already exists in the file"

The program should work for any number of rows in the two text files.

The code should use good programming practices with sensible variable names, proper indentation and comments where needed.

In: Computer Science

Since so many will opt for Security, you are to EXCLUDE Security, and choose one of...

Since so many will opt for Security, you are to EXCLUDE Security, and choose one of the other four.  Which of the other four do you feel is the most important challenge, and why? Give a real-world example to support your opinion. In addition, give at least one method you would choose to mitigate the challenge.

Security - how do you keep the bad guys out if you enable the IoT for your personal and professional life?
Privacy - how do you protect your family's identity and privacy data fro theft or unauthorized access that can lead to identity theft?
Interoperability and standards - how well do IoT manufacturers and ASP developers ensure that devices can communicate securely?
Legal and regulatory compliance - what role do the international, federal, and state levels contribute toward legal, tax, and regulatory requirements regarding IoT-related business transactions that involve payment for goods and services?
E-commerce and economic development issues - what are the economic rules of engagement for conducting business on the World Wide Web? How is IoT connectivity and information sharing to be deployed globally?

In: Computer Science

Package pacman.score Class ScoreBoard Object ScoreBoard public class ScoreBoard extends Object ScoreBoard contains previous scores and...

Package pacman.score

Class ScoreBoard

  • Object
    • ScoreBoard
  • public class ScoreBoard
    extends Object
    ScoreBoard contains previous scores and the current score of the PacmanGame. A score is a name and value that a valid name only contains the following characters:
    • A to Z
    • a to z
    • 0 to 9
    and must have a length greater than 0. The value is a integer that is equal to or greater than 0.

    Implement this for Assignment 1

    • Constructor Summary

      Constructors
      Constructor Description
      ScoreBoard()

      Creates a score board that has no entries and a current score of 0.

    • Method Summary

      All MethodsInstance MethodsConcrete Methods
      Modifier and Type Method Description
      List<String> getEntriesByName()

      Gets the stored entries ordered by Name in lexicographic order.

      List<String> getEntriesByScore()

      Gets the stored entries ordered by the score in descending order ( 9999 first then 9998 and so on ...) then in lexicographic order of the name if the scores match.

      int getScore()

      Get the current score.

      void increaseScore​(int additional)

      Increases the score if the given additional is greater than 0.

      void reset()

      Set the current score to 0.

      void setScore​(String name, int score)

      Sets the score for the given name if: name is not null name is a valid score name score is equal to or greater than zero. This should override any score stored for the given name if name and score are valid.

      void setScores​(Map<String,​Integer> scores)

      Sets a collection of scores if "scores" is not null, otherwise no scores are modified.

      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScoreBoard

        public ScoreBoard()

        Creates a score board that has no entries and a current score of 0.

        Implement this for Assignment 1

    • Method Detail

      • getEntriesByName

        public List<String> getEntriesByName()
        Gets the stored entries ordered by Name in lexicographic order. The format of the list should be:
        1. Score name with a single space afterwards
        2. A single colon
        3. A space then the value of the score with no leading zeros.
        Example:
             ScoreBoard board = new ScoreBoard();
             board.setScore("Fred", 100);
             board.setScore("fred", 20);
             board.setScore("Fred", 24);
        
             List<String> scores = board.getEntriesByName();
             System.out.println(scores);
        
             // this outputs:
             // [Fred : 24, fred : 20]
        
         

        Returns:

        List of scores formatted as "NAME : VALUE" in the order described above or an empty list if no entries are stored.

        Implement this for Assignment 1

      • getEntriesByScore

        public List<String> getEntriesByScore()
        Gets the stored entries ordered by the score in descending order ( 9999 first then 9998 and so on ...) then in lexicographic order of the name if the scores match. The format of the list should be:
        1. Score name with a single space afterwards
        2. A single colon
        3. A space then the value of the score with no leading zeros.
        Example:
             ScoreBoard board = new ScoreBoard();
             board.setScore("Alfie", 100);
             board.setScore("richard", 20);
             board.setScore("Alfie", 24);
             board.setScore("ben", 20);
        
             List<String> scores = board.getEntriesByScore();
             System.out.println(scores);
        
             // this outputs
             // [Alfie : 24, ben : 20, richard : 20]
         

        Returns:

        List of scores formatted as "NAME : VALUE" in the order described above or an empty list if no entries are stored.

        Implement this for Assignment 1

      • setScore

        public void setScore​(String name, int score)
        Sets the score for the given name if:
        • name is not null
        • name is a valid score name
        • score is equal to or greater than zero.
        This should override any score stored for the given name if name and score are valid.

        Parameters:

        name - of scorer.

        score - to set to the given name.

        Implement this for Assignment 1

      • setScores

        public void setScores​(Map<String,​Integer> scores)
        Sets a collection of scores if "scores" is not null, otherwise no scores are modified. For each score contained in the scores if:
        • name is not null
        • name is a valid score name
        • score is equal to or greater than zero.
        the score will be set and override any stored score for the given name, otherwise it will be skipped.

        Parameters:

        scores - to add.

        Implement this for Assignment 1

      • increaseScore

        public void increaseScore​(int additional)

        Increases the score if the given additional is greater than 0. No change to the current score if additional is less than or equal to 0.

        Parameters:

        additional - score to add.

        Implement this for Assignment 1

      • getScore

        public int getScore()

        Get the current score.

        Returns:

        the current score.

        Implement this for Assignment 1

      • reset

        public void reset()

        Set the current score to 0.

I don't know how to deal with this part.

In: Computer Science

Note: Anwer this as mention in the Question and do it urgently ( just simple uml...

Note: Anwer this as mention in the Question and do it urgently ( just simple uml of dry run kindly please fo fast)

Q1: Test the follow code step by step from the main. Add enough detail to justify the use of OOP concepts in these examples. Also draw the UML diagram using all given code. Finally show the output of this code [Note: Only output will not acceptable]


public class Person
{
private String name;
public Person()
{
name = "none";
}
public Person(String theName)
{
name = theName;
}
public Person(Person theObject)
{
name = theObject.name;
}
public String getName()
{
return name;
}
public void setName(String theName)
{
name = theName;
}
public String toString()
{
return name;
}
public boolean equals(Object other)
{
return name.equals(((Person)other).name);
}
}
public class Vehicle
{
private String mf;
private int cd;
private Person own;
public Vehicle()
{
mf = "none";
cd = 1;
own = null;
}
public Vehicle(String themf, int numcd, Person theown)
{
mf = themf;
cd = numcd;
own = new Person(theown);
}
public Vehicle(Vehicle other)
{
mf = other.mf;
cd = other.cd;
own = new Person(other.own);
}
public void setmf(String newmf)
{
mf = newmf;
}
public void setcd(int newNum)
{
cd = newNum;
}
public void setown(Person newown)
{
own = new Person(newown);
}
public String getmf()
{
return mf;
}
public int getcd()
{
return cd;
}
public Person getown()
{
return own;
}
public String toString()
{
return mf + ", " + cd + " cd, owned by " + own;
}
public boolean equals(Vehicle other)
{
return mf.equals(other.mf) && cd == other.cd;
}
}
public class Truck extends Vehicle
{
private double load;
public int capacity;
public Truck()
{
super();
load = 0;
capacity = 0;
}
public Truck(String m, int c,
Person p, double loads,
int capc)
{
super(m, c, p);
load = loads;
capacity = capc;
}
public Truck(Truck oth)
{
super(oth);
load = oth.load;
capacity = oth.capacity;
}
public void setload(double newLoad)
{
load = newLoad;
}
public void setcapacity(int newCaps)
{
capacity = newCaps;
}
public double getload()
{
return load;
}
public int getcapacity()
{
return capacity;
}
public String toString()
{
return super.toString() + ", " + load + " lbs load, " + capacity + " tow";
}
public boolean equals(Truck oth)
{
return super.equals(oth) &&
load == oth.load &&
capacity == oth.capacity;
}
}
public class CompleteTest
{
public static void main(String args[])
{
Person owner1 = new Person("Nathan Roy");
Person owner2 = new Person("Peter England");
Vehicle aCar = new Vehicle("Honda", 5, owner2);
Truck aTruck = new Truck();
aTruck.setmf("Skoda");
aTruck.setcd(100);
aTruck.setown(owner1);
aTruck.setload(150.50);
aTruck.setcapacity(3200);
System.out.println("Truck Details: ");
System.out.println(aTruck.getmf());
System.out.println(aTruck.getcd());
System.out.println(aTruck.getown());
System.out.println(aTruck.getload());
System.out.println(aTruck.getcapacity());
System.out.println();
System.out.println("Details of Vehicle 1: ");
System.out.println(aCar);
System.out.println("Details of Vehicle 2: ");
System.out.println(aTruck);
}
}

In: Computer Science

What constitutes Web 2.0? List the different sites and services, and discuss the details for at...

What constitutes Web 2.0? List the different sites and services, and discuss the details for at least 5 of them.

Provide details on which features you found particularly interesting and why.

In: Computer Science

The Scenario You are the new manager for a non-profit amateur soccer league. The league needs...

The Scenario You are the new manager for a non-profit amateur soccer league. The league needs to purchase productivity software to keep track of participant and budget information and to prepare flyers. It also needs to replace existing hardware. Assignment Overview Prepare a report discussing, evaluating and recommending options to the board of directors. Focus on these 4 topics: ✓ The productivity and security software the soccer league needs ✓ The purpose of that software ✓ The minimum hardware requirements ✓ The likely cost of the whole system (hardware and software)

In: Computer Science

consider a scenario where a company has to automate its systems and wants to store the...

consider a scenario where a company has to automate its systems and wants to store the details of its employees with their empno, name, emailid, salary, DoB ,age ,gender,and address to be stored .Emailid is the primary key. every employee works on multiple projects (pno ,pname, ) and one project may involve many employees who belong to various departments ( dname,loc ) . each employee many have dependents ( depno, depname,relationship) . the depno ia unique among the dependants of samw employee but duplicate across the employee . draw the ER diagram with appropriate notations, relationships,with candidates and participation constraints. (note : make no new assumptions regarding the design and strictly adhere to the given details only )

In: Computer Science

PLEASE TYPE OUT IN TEXT (please no pdf or writing) C++ PLEASE Summary For each used...

PLEASE TYPE OUT IN TEXT (please no pdf or writing)

C++ PLEASE

Summary

For each used car a salesperson sells, the commission is paid as follows: $20 plus 30% of the selling price in excess of the cost of the car.

Typically, the minimum selling price of the car is the cost of the car plus $200 and the maximum selling price is the cost of the car and $2,000.

Instructions

Write a program that prompts the user to enter:

  1. Purchasing cost of the car
  2. The minimum to be added to the purchasing cost
  3. The maximum to be added to the purchasing cost
  4. Salesperson’s fixed commission
  5. Percentage of the commission

The program should output:

  1. The minimum and maximum selling price of the car
  2. The salesperson’s commission range

Since your program handles currency, make sure to use a data type that can store decimals.

In: Computer Science