Questions
A job ad for Gaggle Inc. says that it is necessary to major in math, computer...

  1. A job ad for Gaggle Inc. says that it is necessary to major in math, computer science, or philosophy, and be an A or B student. However, Gaggle makes an exception and does not have any grade requirements if you have won a Turing award or Fields Medal (they still have the major requirements). You have also heard through the grapevine that it is sufficient that you are in one of these 3 majors and an A student.

    Express the above as one PC wff. You should of course state what your atoms represent. Please do not do any form of reasoning to simplify the wff – that’s not the point here, and may also introduce bugs.

In: Computer Science

1. Using Kerberos for authentication eliminates the need for a user to have a password for...

1. Using Kerberos for authentication eliminates the need for a user to have a password for each server or resource they want to access.

True

False

2. Secure hash functions provide data integrity, but not data authenticity .

True

False

3. Which of the following is an example of "Something you possess"?

Key

Face Recognition

Finger print

Password

4. ____________ enables the sharing of identities across different enterprises for user access to applications.

Identity Federation

Kerberos Realm

Public-key infrastructure

Multifactor Authentication

5. Which of the following is considered an offline password attack?

Man-in-the-middle attack

Packet sniffing attack

Replay Attack

Rainbow Attack

6. Linux based system use a method called __________ in their password hashes to create unique hashes for all passwords.

LM-hash

SHA-512

Virtual Secure Mode

Salting

In: Computer Science

IN PYTHON: write a new subclass hiAccount that allows you to earn interest at the rate...

IN PYTHON:

write a new subclass hiAccount that allows you to earn interest at the rate of .01% per SECOND.

Write a new method called checkBalance for hiAccount that computes hiAccount's value, accounting for the growth of your hiAccount between when the time when the deposit was made and when you invoke checkBalance.

using following code:

class Account:
"""A bank account that has a non-negative balance."""
def __init__(self, account_holder):
"""Every Account is described using the name of the account holder, which is a string."""
self.balance = 0
self.holder = account_holder
def deposit(self, amount):
"""Increase the account balance by amount and return the new balance."""
self.balance = self.balance + amount
return self.balance
def withdraw(self, amount):
"""Decrease the account balance by amount and return the new balance."""
if amount > self.balance:
return 'Insufficient funds'
self.balance = self.balance - amount
return self.balance

In: Computer Science

add -54 and -101 using 9 bit 2's complement

add -54 and -101 using 9 bit 2's complement

In: Computer Science

Shapes2D Write the following four classes to practice using an abstract class and polymorphism. Submit all...

Shapes2D

Write the following four classes to practice using an abstract class and polymorphism. Submit all four classes.

Shape2D class

For this class, include just an abstract method name get2DArea() that returns a double.

Rectangle2D class

Make this class inherit from the Shape2D class. Have it store a length and a width as fields. Provide a constructor that takes two double arguments and uses them to set the fields. Note, the area of a rectangle is the length times the width.

Circle2D class

Also make this class inherit from the Shape2D class. Have it store a radius as a field. Provide a constructor that takes a double argument and uses it to set the field. Note, the area of a circle is PI times it's radius times it's radius.

Shape2DDriver class

Have this class provide a method named displayArea() that takes an object from just any of the above three classes (you can't use an Object type parameter). Have the method display the area of the object, rounded to one decimal place.

Also the code should Enforce an abstract get2DArea() method and the right parameter type for displayArea()

Executes the following code:

Shape2DDriver tester = new Shape2DDriver();

Rectangle2D r = new Rectangle2D( 2, 3 );

Circle2D c = new Circle2D( 4 );

tester.displayArea( r );

tester.displayArea( c );

In: Computer Science

add -19 and 79 using 16-bit 2's complement format

add -19 and 79 using 16-bit 2's complement format

In: Computer Science

Please write a program in c# that meets the following specifications.   Dominion Gas Corporation would like...

Please write a program in c# that meets the following specifications.  

Dominion Gas Corporation would like you to develop an application that helps them calculate the gas consumption bill of their customers. The application would first ask for the customer account number, the customer name and the type of account (residential or commercial). Then the application asks for the gas consumed during the past month by the customer in MCF (the unit used to indicate the amount of gas consumed). After gathering all this information the application calculates the bill based on the type of account (residential or commercial) and prints out the bill.

Technical Specifications:

The application will have two classes: Account and AccountTest

The Account class will have the following elements in it:

INSTANCE VARIABLES:

  • Instance variable for account number and its property
  • Instance variable customer name and its property
  • Instance variable balance and its property
  • Instance variable to store mcf
  • Instance variable to store the rate of the account ($8.99 for residential, $11.99 for commercial)
  • Instance variable to store usage charge for consumption of gas (mcf * rate)
  • Instance variable to store municipal charge (2% of usage charge)
  • Instance variable to store excise tax (5% of usage charge)

Constructor

  • A constructor that accepts the account number and the customer name and uses those two values to initialize the appropriate instance variables (account number, customer name)

Methods

  • A method that calculates the bill.
    • This method asks the user for the type of account (residential/commercial) for which the bill is to be calculated.
    • It also asks the user for the MCF used.
    • Based on these two pieces of information, it calculates the usage charge, municipal charge, excise tax and balance. It stores all these figures in their appropriate instance variables.
  • A method that displays the bill.
    • This method simply prints out all the information about the bill such as the customer name, account number, the usage charge, municipal charge, excise tax and balance (see figures for samples of output)

The AccountTest class will have the following elements in it

the main method performs the following actions

asks for the account number, reads it in and stores it in a variable

Asks for the customer name, reads it in and stores it in a variable

uses these two pieces of information to create an object using the Account class's constructor

Calls the method that calculates the bill for the object created

calls the method that displays the bill for the object created.

In: Computer Science

add -54 and -101 using 9 bit 2's complement

add -54 and -101 using 9 bit 2's complement

In: Computer Science

add -19 and 79 using 16-bit 2's complement format

add -19 and 79 using 16-bit 2's complement format

In: Computer Science

add -19 and 79 using 16-bit 2's complement format

add -19 and 79 using 16-bit 2's complement format

In: Computer Science

i need C++ program with possible comments what is going on,(a) Write a program that reads...

i need C++ program with possible comments what is going on,(a) Write a program that reads a char as input, and determines if it is a lowercase letter, uppercase letter, a digit or something else (call the last one a special character).

In: Computer Science

4NCA: 4.7 What is a nonce? 4.8 What are two different uses of public-key cryptography related...

4NCA:

  • 4.7 What is a nonce?

  • 4.8 What are two different uses of public-key cryptography related to key distribution?

  • 4.9 What are the essential ingredients of a public-key directory?

  • 4.10 What is a public-key certificate?

  • 4.11 What are the requirements for the use of a public-key certificate scheme?

  • 4.12 What is the purpose of the X.509 standard?

  • 4.13 What is a chain of certificates?

  • 4.14 How is an X.509 certificate revoked?

In: Computer Science

add -54 and -101 using 9 bit 2's complement

add -54 and -101 using 9 bit 2's complement

In: Computer Science

Hello, I need to divide my code in this different parts. Use a standard approach to...

Hello, I need to divide my code in this different parts.

Use a standard approach to source files in this assignment: a .cpp for each function (you have at least two – main and ageCalc) a header file for the student struct, properly guarded

Code:

#include <iostream>

#include <string>

#include <fstream>

#include <algorithm>

#include <vector>

#include <iomanip>

using namespace std;

#define nullptr NULL

#define MAX_SIZE 100

struct Student

{

    string firstName;

    char middleName;

    string lastName;

    char collegeCode;

    int locCode;

    int seqCode;

    int age;

};

struct sort_by_age

{

    inline bool operator()(const Student *s1, const Student *s2)

    {

        return (s1->age < s2->age);

    }

};

int ageCalc(Student *studs[], Student *&youngest);

int main()

{

    Student *students[MAX_SIZE] = {nullptr};

    ifstream Myfile;

    Myfile.open("a2data.txt");

    if (!Myfile.is_open())

    {

        cout << "Could not open the file!";

        return 1;

    }

    vector<string> words;

    string line;

    while (!Myfile.eof())

    {

        getline(Myfile, line);

        line.c_str();

        int i = 0;

        string word = "";

        while (line[i] != '\0')

        {

            if (line[i] != ' ')

            {

                word = word + line[i];

                i++;

            }

            else

            {

                if (word != "")

                    words.push_back(word);

                word = "";

                i++;

            }

        }

        words.push_back(word);

    }

    Myfile.close();

    int count = 0;

    string fname = words.at(count);

    count++;

    int n = 0;

    while (count < words.size() - 2)

    {

        Student *s = new Student;

        s->firstName = fname;

        string mname = words.at(count);

        s->middleName = mname[0];

        count++;

        s->lastName = words.at(count);

        if (words.at(count).size() >= 12)

        {

            if (words.at(count)[1] >= '0' && words.at(count)[1] <= '9')

            {

                count--;

                s->middleName = ' ';

                s->lastName = words.at(count);

            }

        }

        count++;

        string id = words.at(count);

        count++;

        s->collegeCode = id[0];

        string loc = "";

        loc = loc + id[1];

        loc = loc + id[2];

        s->locCode = stoi(loc);

        string seq = "";

        for (int j = 3; j < 9; j++)

        {

            seq = seq + id[j];

        }

        s->seqCode = stoi(seq);

        string age = "";

        age = age + id[9];

        age = age + id[10];

        age = age + id[11];

        s->age = stoi(age);

        fname = id.erase(0, 12);

        students[n] = s;

        n++;

    }

    words.clear();

    sort(students, students + n, sort_by_age());

    cout << setw(15) << left << "Last Name";

    cout << setw(15) << left << "Midlle Name";

    cout << setw(15) << left << "First Name";

    cout << setw(15) << left << "College Code";

    cout << setw(12) << left << "Location";

    cout << setw(12) << left << "Sequence";

    cout << setw(12) << left << "Age" << endl;

    cout << "=======================================================================================" << endl;

    for (int i = 0; i < n; i++)

    {

        cout << setw(15) << left << students[i]->lastName;

        cout << setw(15) << left << students[i]->middleName;

        cout << setw(20) << left << students[i]->firstName;

        cout << setw(13) << left << students[i]->collegeCode;

        cout << setw(10) << left << students[i]->locCode;

        cout << setw(12) << left << students[i]->seqCode;

        cout << students[i]->age << endl;

    }

    cout << endl;

    Student *youngest = NULL;

    int avg_age = ageCalc(students, youngest);

    cout << "Average age is: " << avg_age << endl;

    cout << "Youngest student is " << youngest->firstName << " " << youngest->middleName << " " << youngest->lastName << endl;

    return 0;

}

int ageCalc(Student *studs[], Student *&youngest)

{

    youngest = studs[0];

    int i = 0;

    int avg_age = 0;

    while (studs[i] != NULL)

    {

        avg_age += studs[i]->age;

        if (youngest->age > studs[i]->age)

            youngest = studs[i];

        i++;

    }

    return avg_age / i;

}

File needed:

https://drive.google.com/file/d/15_CxuGnFdnyIj6zhSC11oSgKEYrosHck/view?usp=sharing

In: Computer Science

I need a uml diagram of password manager and little explaining about it as a project...

I need a uml diagram of password manager and little explaining about it as a project report

In: Computer Science