Questions
Problem: Given seven 8-mers as listed below ATCGATAG GGCCAATT CGATATCG AAGCAAGC AGCGTACG CCGCATTA ATCCATCG 1) Create...

Problem: Given seven 8-mers as listed below

ATCGATAG

GGCCAATT

CGATATCG

AAGCAAGC

AGCGTACG

CCGCATTA

ATCCATCG

1) Create the profile matrix; 2) Derive the consensus; 3) Calculate the consensus score; 4) Calculate the total distance between the 8-mers and the consensus.

In: Computer Science

Your company has asked you to develop a report detailing payroll information with the following format:...

Your company has asked you to develop a report detailing payroll information with the following format:

Acme Corporation

Number of Employees: 3
Average Salary: 70,530.70
Annual Total: 211,592.09

Name Rank Salary
Gator, Allie A2 48,000.00
Mander, Sally A1 61,123.89
Zah, Pete A1 102,468.20

Develop an Employee class that contains first name, last name, rank, and salary. The class should have the following methods:

parameterized constructor
getters necessary for printing the report
formatName() method that returns a String with the name in the format last, first

Employee information is stored in a sequential text file named employees.txt. The file has the format:

employees.txt file: text file with the following fields separated by spaces:
Fields Description
First Name string
Last Name string
Rank string
Salary double
Note: Names will not contain spaces.

Write a program named Prog5 that reads employee information from the file and places a corresponding Employee object into an array. After the file has been read, print the report shown above using proper formatting.

Challenge

For those who would like a challenge to increase the difficulty of the assignment, implement the following static methods to be used to print the average salary and annual total, both of which receive an array of doubles and the number of elements in the array:

averageSalary( Employee arr[], int numreturns the average salary of employees in the array
totalSalary( Employee arr[], int num ) returns the sum of all salaries of employees in the array

Note: This is not required and should not be attempted until you have the basic assignment completed.


Requirements

• Your source code should follow the Java programming standards for the course.
• Your source code should be documented using Javadoc style according to the course standards.
• Use the default package in your project; do not specify a package in your code.
• Use any file and class names specified in the assignment.

In: Computer Science

Using the following list and a “for” loop, display differences of all consecutive pairs of numbers...

Using the following list and a “for” loop, display differences of all consecutive pairs of numbers in the list. our_list = [1,2,5,6,3,77,9,0,3,23,0.4,-12.4,-3.12] The output should look like this: 1 3 1 … 4.

Using a “while loop” ask the user for a number and add it to a list if number is even and to a different list if number is odd. Keep asking the user for a number until he says “I’m bored” and doesn't want to give you any more numbers.

5. For the following list, print each element in the list an it’s type. list5 = ['a','b',1,2,[1,2,3,4],'hello',(4,5,6),7,True,"False",2.3]

In: Computer Science

In Matlab , Write a script that will print a side-ways triangle pattern of stars in...

In Matlab , Write a script that will print a side-ways triangle pattern of stars in

the command window. The script should ask the user how many stars will be

between the center of the triangle at the base and the tip of the

triangle

In: Computer Science

Solve following tasks using MIPS Task Write a program that gets a number from user and...

Solve following tasks using MIPS
Task

Write a program that gets a number from user and displays “Even”, or “Odd. (If-else)


Write a program that input a number from user displays each digit separately. For example if input is 3986, output is  6, 8, 9 ,3. (Loop)


Write a program that converts a decimal number to binary. (Loop)


Hint for Task 1 and Task 3.

    Use, div $tdivident,$tdivider and mfhi $tdestination instructions.

For example,

Div $t1,$t2 will divide $t1 from $t2 and move the quotient to LOW register and remainder to HI        register

mfhi $t3 will move remainder from HIGH register to $t3.

In: Computer Science

Provide a formal proof of the correctness of the algorithm by Boruvka/Solllin for finding a MST.

Provide a formal proof of the correctness of the algorithm by Boruvka/Solllin for finding a MST.

In: Computer Science

true or false C++ a.    (T or F)  There can be no code between a try-block and its...

true or false C++

a.    (T or F)  There can be no code between a try-block and its associated catch-block.

b.    (T or F)  The reserved word throw is used to signal that an exception has occurred.

c.    (T or F)  The correct use of throw can be anywhere in a program; a try /  catch structure is used only in class definitions.

d.    (T or F)  In C++, class is not a reserved word.

e.    (T or F)  Class attributes have no fixed type; their type can be changed during the program execution.


In: Computer Science

In Python, write a program that computes machine epsilon (macheps) in: Single precision (32 bits) and...

In Python, write a program that computes machine epsilon (macheps) in:

Single precision (32 bits) and Double precision (64 bits)

In: Computer Science

Please answer QC,D,E,F using the code provided at the end please. A. Write C code to...

Please answer QC,D,E,F using the code provided at the end please.

A. Write C code to define a structure called date that has three fields day, month, year, all of which are ints.

B. Write C code to define a structure called person that has fields for name (50 char array), dateOfBirth (date struct from Q1), address (200 char array), phoneNum (20 char array), and ID (int).

C. Write a C program that uses the person structure from Q2, and declares a variable of this type. Your program should then read information from the keyboard to fill one of these structures with information. Use fgets to read entire lines of text for the name and address rather than scanf.

D. Create another variable that is a pointer to the person structure defined in Q2. Set this variable to point at the variable declared in Q3, and then use the pointer to print the structure to the screen (with appropriate text).

E. Show how a typedef statement can be used to declare a new data type – to demonstrate this create a new type called Person which is the structure declared previously.

F. . Write C code to declare an array of 50 pointers to Persons. Using a loop, use malloc to dynamically allocate memory for each of these structures. There is no need to put any values into the structures. Use a second loop to then deallocate each structure.

__________________________________________________________________________________________________________________________

#include<stdio.h>

#include<stdlib.h>

#define NAME_SIZE 50

#define address_SIZE 200

#define phone_SIZE 20

// Part A defining the structure

struct Date{

int day, month, year;

};

// Part B defining the Person structure

struct Person{

char name[NAME_SIZE];

struct Date dateOfBirth;

char address[address_SIZE];

int id;

char phoneNumber[phone_SIZE];

};

// Main function for the same

int main(){

// part C defining the variable for the use of above structure

struct Person p;

// Just to make the inputs go flowlessly

char newLine;

// Taking the user input

printf("Enter the person name: ");

fgets(p.name, NAME_SIZE, stdin);

printf("Enter dob in 'day month year' Format");

scanf("%d%d%d", &p.dateOfBirth.day, &p.dateOfBirth.month, &p.dateOfBirth.year);

scanf("%c", &newLine);

printf("Enter the address: ");

fgets(p.address, address_SIZE, stdin);

printf("Enter the id: ");

scanf("%d", &p.id);

scanf("%c", &newLine);

printf("Enter the phone number: ");

fgets(p.phoneNumber, phone_SIZE, stdin);

// part D defining the pointer for the person

struct Person* p2;

p2 = &p;

// Printing the Scanned values

printf("Printing the populated Person Structure\n");

printf("Name: %s\n", p2->name);

printf("DOB: %d %d %d\n", p2->dateOfBirth.day, p2->dateOfBirth.month, p2->dateOfBirth.year);

printf("Address: %s\n", p2->address);

printf("Id: %d\n", p2->id);

printf("Phone: %s\n", p2->phoneNumber);

In: Computer Science

Write a program that prompts the user for the length of one side of a triangle...

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

implement a formula of your own choosing, as a Python function, following these instructions: You need...

implement a formula of your own choosing, as a Python function, following these instructions:

  • You need to write a function that takes multiple arguments (not input from the keyboard!), and that returns the result of a formula of your choosing (not printing the output on the screen!).
  • For your function definition, choose a formula from mathematics, science, or a related field.
  • Then, in the main part of the script, write the main Python code (outside of any function) that asks the user to input the appropriate values, then uses the function you just defined to do a calculation, and then outputs the result.
  • Make sure that the user of the script knows what they are expected to input, what the script is going to calculate, and what the output means. (Remember that units are important!)
  • Don't pick a formula that is too simple; make sure that it's got at least two variables, and that it uses more than one operation (so don't pick a formula such as the volume of a 'box' isVolume = length * width * height,

In: Computer Science

4 function calculator (op1 oper op2) using scheme language also include comments

4 function calculator (op1 oper op2) using scheme language

also include comments

In: Computer Science

C# Language Create a class called evaluateValue that declares 3 integer class variables: zeroValue, positiveValue and...

C# Language

  • Create a class called evaluateValue that declares 3 integer class variables: zeroValue, positiveValue and negativeValue. These should be declared as public and you should not use automatic properties to declare them.
  • Your class should have a constructor that takes one integer argument. In the constructor you will code if statements to set one of the three class variables (indicators) to 1 if the number sent to the constructor is either equal to zero, negative, or positive.
  • In the class provide a method printit() used to print the results
    • Evaluate the positive, negative, and zero indicator to determine which line to print. If the indicator is set to 1 then the indicator is true.
    • You will print one of three statements;
      • The number was zero.
      • The number was positive.
      • The number was negative.
  • In the default wrapper class named assignment3 and containing Main write the code in Main that declares one integer variable: val1.
  • Use Console Write and Readline and the convert method to take the integer entry from the keyboard and pass it to the evaluateValue constructor.
  • Instantiate an evaluateValue object and pass the integer values to the constructor.
  • From Main call the printit method which will print the resulting evaluation in the class object.

In: Computer Science

Pyramid of oranges, 2^x in each row, total for n rows using scheme language also include...

Pyramid of oranges, 2^x in each row, total for n rows using scheme language also include comments

In: Computer Science

The following task does not involve writing program code: instead, you will be writing function signatures...

The following task does not involve writing program code: instead, you will be writing function signatures for hypothetical functions (you will be defining functions in subsequent tasks).

  1. For this task, you are presented with several 'hypothetical' functions. These aren't built-in Python functions: they are functions that you will have to define (i.e. implement, write) yourself later. however, you only need to write a signature for each hypothetical function listed here:
    1. toThePower(): takes two numbers e.g. x and y , and returns the value of (x to the power y). For example, toThePower(3,3) returns 27, and toThePower(-0.1,3) returns -0.001.
    2. quadruplicate(): takes a string, and returns a string consisting of three copies of that string concatenated together. For example, quadruplicate("na") returns "nananana", and quadruplicate("..?") returns "..?..?..?..?".
    3. subtract(): takes two numbers, and returns the difference between them. For example, subtract(10,3) returns 7, and subtract(2.2,5) returns -2.8.
    4. overlap(): We are not going to tell you exactly what it does, but we will give you a few examples: overlap("banana","analyze") returns 3 (not 4), overlap("abracadabra","abraham") returns 4 (not 5), overlap("foobar","red") returns 1, and overlap("foobar","bazinga") returns 0.
    5. multiplicate(): We are not going to tell you exactly what it does, but we will give you a few examples: multiplicate("x",5) returns "xxxxx", multiplicate("goo",3) returns "googoogoo", and multiplicate("never",0) returns "" (the empty string).

In: Computer Science