Questions
C++ Coding Exercise (If... Else) Hello All, I know this question has been asked before, but...

C++ Coding Exercise (If... Else)

Hello All, I know this question has been asked before, but I was unable to run any of the programs that were posted and I'm stuck. I would like to see an explanation with the code and exactly how to add a .txt file to the program through VS 2019, if possible.

LAB:

Write a C++ program that computes a student’s grade for an assignment as a percentage given the student’s score and total points. The final score must be rounded up to the nearest whole value using the ceil function in the header file. You must also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by a space.

In addition, you must print to the console “Excellent” if the grade is greater than or equal to 90, “Well Done” if the grade is less than 90 and greater than or equal to 80, “Good” if the grade is less than 80 and greater than or equal to 70, “Need Improvement” if the grade is less than 70 and greater than or equal to 60, and “Fail” if the grade is less than 60.

In: Computer Science

Python Programming This assignment will give you practice with interactive programs, if/else statements, collections, loops and...

Python Programming

This assignment will give you practice with interactive programs, if/else statements, collections, loops and functions.

Problem Description
A small car yard dealing in second hand cars needs an application to keep records of cars in stock. Details of each car shall include registration(rego), model, color, price paid for the car (i.e. purchase price) and selling price. Selling price is calculated as purchased price plus mark-up of 30%. For example, Toyota Corolla bought for $20,000 will have the selling price of 20000 * (1 + 0.3) = 26000.

Task Requirements
Imagine you have been invited to develop a menu driven python application to manage records of cars in stock. Based on the problem description, starter program (code template) has been provided. Investigate the provided starter program. There are four scripts(application.py, caryard.py, cars.py and vehicle.py). Driver function(main) is defined in the appliction.py, which imports caryard module(caryard.py). Caryard declares all the core functions (buy, sell, search, etc. …) for supporting the car yard business. The caryard module imports cars module(cars.py), and the cars module in turn imports the vehicle that include a definition of a Car class.
Program is executed by loading and running the application.py. The important work of interconnecting and wiring of modules and functions have been already been done. However, most of these functions, although declared and wired up in the program are not yet implemented. Your task is to implement these functions. There are eleven (11) tasks to be completed described next within the modules:

1. application.py
• Task 1: implement menu ()


2. caryard.py
• Task 2: implement buy_car ()
• Task 3: implement sell_car ()
• Task 4: implement search_car ()
• Task 5: implement list_all_cars ()


3. cars.py
• Task 6: implement addCar (rego, model, color, price)
• Task 7: implement removeCar (rego)
• Task 8: implement all_cars ()
• Task 9: implement search(rego)


4. vehicle.py
• Task 10: implement the Car class
• Task 11: UML model of a Car class

Description of Program functions:

Program displays a menu on execution. Five menu options are available to allow the user to buy, sell, search, show all cars, and exit program respectively. Program functionality and screen output for each of the menu option when selected by the user follows:

Program menu on execution:



Option 1 (Buy a car): User enters 1. Note the error message for duplicate car rego


Option 2 (Sell a car): User enters 2. Note the error message for invalid car rego, and the sell price which is a (30%) mark-up of purchase price.

Option 3 (Search): User enters 3

Option 4 (Show all): User enters 4

Option 5 (Exit Program): User enters 5

In: Computer Science

Course : Physical Security Submit a paper on the weaknesses of biometric authentication Assignment is worth...

Course : Physical Security

Submit a paper on the weaknesses of biometric authentication

Assignment is worth 50 points and 10% of your grade

  • Submit a paper on the weaknesses of biometric authentication
  • There are numerous examples of weaknesses, write about the ones which interest you the most
  • Do NOT use bullets, that is not APA format!
  • Paper MUST be submitted in APA format
  • Propose a mitigating control or controls to help overcome the weaknesses identified in your paper
  • Submit at least 2 but no more than 4 pages double spaced
  • No photos or graphs
  • Reference all sources used
  • Individual work and NOT a group effort

In: Computer Science

SQL Server 6. Our new system cannot handle Unicode (Links to an external site.) characters, only...

SQL Server

6. Our new system cannot handle Unicode (Links to an external site.) characters, only ASCII (Links to an external site.) characters.
The current Productname data type is NVARCHAR, which is unicode, and might have non-ASCII characters in it. We need to check!
Show the ProductID, and ProductName, and the first location of any non-Unicode characters. See the note at the bottom for how to find non-Unicode characters.

In: Computer Science

When a user program needs the operating system to perform an input operation on its behalf...

When a user program needs the operating system to perform an input operation on its behalf such as reading a fixed number of bytes from a file into a string variable, it needs to issue a system call. Explain the sequence of events that take place when a user program issues a system call, until the time the request from the user program is satisfied, under the assumption that the computer has dual mode operation.

In: Computer Science

Convert a list of decimal numbers into their binary and hexadecimal equivalents Add the elements of...

  1. Convert a list of decimal numbers into their binary and hexadecimal equivalents
  2. Add the elements of each of these lists to generate a total sum
  3. Print the lists, and the total sum of each value

C++ contains some built-in functions (such as itoa and std::hex) which make this assignment trivial. You may NOT use these in your programs. You code must perform the conversion through your own algorithm.

The input values are:


5

9

24

2

39

83

60

8

11

10

6

18

31

27

In: Computer Science

(Minimum 100 words) 1. What are the two different transmission modes? Explain? 2.Define a DC component...

(Minimum 100 words)

1. What are the two different transmission modes? Explain?

2.Define a DC component and its effect on digital transmission.

3. Distinguish between a signal element and a data element

In: Computer Science

Using Python read dataset in the HTML in beautiful way. You need to read CSV file...

Using Python read dataset in the HTML in beautiful way.

You need to read CSV file ( Use any for example, You can use small dataset)
You need to use pandas library
You need to use Flask

Make search table like YouTube has.

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

Design and implement a special purpose system that allows access to doors 1 and 2 (D1...

Design and implement a special purpose system that allows access to doors 1 and 2 (D1 and D2 respectively) by persons who have been given a valid four-bit binary code. The code is entered using four switches: S1, S2, S3, and S4. Each valid switch can be set to 0 or 1. The system gives access to doors according to the following scheme:

  1. D1 if 0101 or 1110 is entered.
  2. D1 and D2 if 0111 is entered.
  3. D2 if 0100 is entered.

Provide a truth table and implement your circuit only using NOR gates. The correct implementation of this circuit should only have two layers of NOR gates.

In: Computer Science

Design a kernel module that creates a /proc file named /proc/jiffies that reports the current value...

  • Design a kernel module that creates a /proc file named /proc/jiffies that reports the current value of jiffies when the /proc/jiffies file is read, such as with the command

    cat /proc/jiffies
    Be sure to remove /proc/jiffies when the module is removed.

Please help with this assignment using C programming and testing in Linux Ubuntu.

In: Computer Science

C and Systems Programming Part I. Password Strength Meter Weak passwords are common source of e-mail...

C and Systems Programming

Part I. Password Strength Meter

Weak passwords are common source of e-mail and social website accounts hacks. To alleviate this problem, pro-grams, often, when the user chooses a new password, determine if it is an adequately strong password. You are to write a function that validates the password strength. The restrictions that we de ne as our de ned level of strength of passwords is the following: the password must be at least eight characters long, and must include at least one uppercase, one lowercase letter, and one digit. The password cannot contain any other characters than letters and numbers. In addition, it must contain at least one string (consecutive letters) of at least four letters long (uppercase letters, lowecase letters, or combination of both). Furthermore, the password should not contain the username (usernames in our login program are not case-sensitive). Remember, failing to write this piece of code in the program correctly may result in accepting weak and vulnerable passwords. Your code helps rejecting such passwords.

bool i s S t r o n g P a s s w o r d ( const char * username , const char * password ) { // TODO : your code goes here .

}

Enter     username : vahab

Enter     new   password : 1234

Your   password    is week . Try       again !

Enter     username : vahab

Enter     new   password : hello

Your   password    is week . Try       again !

Enter     username : vahab

Enter     new   password : 123 v aH aB k7 89

Your   password    is week . Try       again !

Enter     username : vahab

Enter     new    password : m e A c e C S 2 2 1

Strong    password !

Part II. Default Password Generator

In this part, you will write a C function generateDefaultPassword(char* default_password, const char* username) that generates a default password randomly, which will be sent to the user to login. The users may wish to change the default password to a password of their own, which should pass the password strength meter you implemented in Part I. The default password generated by this function will be stored in a char array that the default_password is pointing to. Remember, the caller of this function (aka main()) must declare an array before passing it to this function, in order to avoid segmentation fault issues.

The default password must be created randomly (every character should be chosen randomly and independently from all allowed characters) and must have all the requirements of a strong password the user selects (Part I) except the following:

The default password must not be longer than 15 characters.

The default password may or may not satisfy the four consecutive letters requirement.

Implement a new function called isStrongDefaultPassword(const char* username, const char* password) which checks if the default password is strong based on the new constraints. This function is almost identical to your isStrongPassword() function in Part I, but needs some modi cations based on the default password requirements. In a loop, your program should then keep creating random strings and check if all the password

requirements for the default password are met. Once a compliant password is generated, the loop stops and your program displays the generated password in the following form:

Generating a default password...

Generated default password:       x1B4fxH81I02

void g e n e r a t e D e f a u l t P a s s w o r d ( char * default_password , const char * username ) {

// TODO : your    code   goes   here .

}

While you are limiting the length of your random password to 15 maximum length, remember that the size of your random password must be random as well.

For both parts, you can write as many helper functions of your own as you like, but as for functions not written by you, you may only use strlen, strcmp, strcpy, and strcat from string.h, and any functions de ned in stdbool.h, stdio.h, ctype.h, time.h, and stdlib.h, only. Your three functions must do exactly as speci ed in this project. You must include all your code relevant to these three functions inside the functions itself. That means, your code must contain these three functions, with the exact function signatures. Your code must compile and run correctly on the Linux lab machines. If we cannot compile your code on the lab machines, you will receive no credit. A small portion of your project grade (5%) is reserved for good code style and adequate comments. While good code style includes many elements, in this class we only grade your projects on suitable variable name choice and indentation.

Here is code for part 1

/**
*
* A password strength meter and a default password generator,
* as defined in the CS221 course website for Project 1.
*
*/

bool isStrongPassword(const char * username, const char * password) {
   //TODO: your code goes here.
   return false;
}

/**
* Example: isStrongDefaultPassword("vahab", "Taher3h") returns false
*/
bool isStrongDefaultPassword(const char* username, const char* password) {
   //TODO: your code goes here.  
   return false;
}

/**
* This function may *not* call isStrongPassword().
* This function must call isStrongDefaultPassword().
*/
void generateDefaultPassword(char * default_password, const char * username) {
   //TODO: your code goes here.  
}

int main(void)
{
   //TODO: your code goes here.
   return 0;
}

In: Computer Science

***This program is to be created using Python*** Requirements to be numbered in program01.py: Print “This...

***This program is to be created using Python***

Requirements to be numbered in program01.py:

  1. Print “This program provides concert seat assignments.”
  2. Ask the user their musical preference and take the following actions based on their potential input:
  • Classical – proceed with the program (i.e. move the next requirement)
  • – output a message that states “We do not recognize the musical genre.” Then end the program.
  1. Ask the user to enter the following data about themselves:

• First Name

• Last Name

• Membership Level

      i. Composer

      ii. Conductor

      iii. Musician

• Seat Preference

      i. Orchestra

      ii. Main

      iii. Balcony

• Meal Type

      i. Chicken

      ii. Fish

      iii. Vegan

  1. Message the following based on criteria (include First and Last Name in messages to user):

• if Composer and Orchestra:

    i. “You qualify for these are exceptional seats!”

• if Composer and Main:

    i. “The seats in the main section are good seats.”

• if Composer and Balcony:

    i. “Interesting, let us know if you want closer seats.”

• if Conductor and Orchestra:

    i. “Member level of Composer required if you want to sit in the orchestra section.”

• if Conductor and Main:

    i. “The seats in the main section are good seats.”

• if Conductor and Balcony:

    i. “Interesting, let us know if you want closer seats.”

• if Musician and Orchestra:

    i. “Member level of Composer required if you want to sit in the orchestra section.”

• if Musician and Main:

    i. “Member level of Composer or Conductor required if you want to sit in the main section.”

• if Musician and Balcony:

  1. “Your balcony seats are confirmed.”
  1. After the concert, the user completes a survey. Ask the user to input a sentiment score 1 – 5 (1 = strongly disagree; 5 = strongly agree) in response to these three statements:

• The concert was wonderful.

• The food was fantastic.

• The seats were superb.

  1. Message to the user based on the following:

• if Composer and (total score less than 12 or any score less than 4):

    i. “Dear Composer, Your survey score of <score> was lower than we would like. Please give us another opportunity soon.”

• Else // Composer

    i. “Thank you for being a Composer member and for having a good time!”

• if Conductor and (total score less than 11 or any score less than 3):

    i. “Dear Conductor, Your survey score of <score> was lower than we would like. The next time you attend we will be nicer.

• Else //Conductor

    i. “Thank you for being a Conductor member and for having a good time!”

• if Musician and (total score less than 10 or any score less than 2):

    i. “Dear Musician, Your survey score of <score> was lower than we would like. You will have more fun next time.”

• Else // Musician

  1. “Thank you for being a Musician member and for having a good time!”

In: Computer Science

- Why do you think that usual maintenance for a widely used website is conducted at...

- Why do you think that usual maintenance for a widely used website is conducted at 12am or 2am.. etc. on weekends? (List three reasons)

- If you believe that a test is successful when it reveals an error then when do you think that it is the time to release a software to market? (Explain in one paragraph)

In: Computer Science

Question 2. The following code defines an array size that sums elements of the defined array...

Question 2. The following code defines an array size that sums elements of the defined array through the loop.

  1. Analyze the following code, and demonstrate the type of error if found?
  2. What we can do to make this code function correctly?

#include <stdio.h>

#define A 10

int main(int argc, char** argv) {

int Total = 0;

int numbers[A];

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

numbers[i] = i+1;

int i =0;

while (i<=A){

   Total += numbers[i];

   i++;

}

printf("Total =%d\n", Total);

return 0;

}

In: Computer Science