Questions
Describe the different molecular interactions that a water molecule can have inside a plant body. What...

  1. Describe the different molecular interactions that a water molecule can have inside a plant body. What is it attracted to? When is it in a liquid phase? When is it in a gas phase?

  2. Name some molecules/conditions that trigger stomata to open. Name some that trigger stomata to close.

In: Biology

1)In a trade name infringemnt case filed in the federal court, how do you decide which...

1)In a trade name infringemnt case filed in the federal court, how do you decide which district (venue) is the proper one?

2) In a trade name infringmwnt case filed in state court, which state/states could hear the case?

In: Accounting

1) What is the pigment that is present in Eurkaryotes GENUINELY (without plastid endosymbiosis, and even...

1) What is the pigment that is present in Eurkaryotes GENUINELY (without plastid endosymbiosis, and even in animals like us), which was used for photosynthesis in some relatives of Eukaryotes?
2) What is the name for those PHOTOYNTHETIC relatives of Eukaryotes? Genus or informal name that is specific enough.

In: Biology

Write a bash shell script that takes exactly one argument, a file name. If the number...

Write a bash shell script that takes exactly one argument, a file name. If the number of arguments is more or less than one, print a usage message. If the argument is not a file name, print another message. For the given file, print on the screen its content.

In: Computer Science

Code in python: Write a class that implements a struct. In your struct store Student information...

Code in python:

  1. Write a class that implements a struct. In your struct store Student information such as name, netid, and gpa. Write a function that can access a student in a list of 5 structs by netid and print their name and gpa. Show that your function works by calling it.

In: Computer Science

This Module is mainly to practice If ... Then ... ElseIf ... with creating a project...

This Module is mainly to practice If ... Then ... ElseIf ... with creating a project in Visual Basics

  1. Open Visual Basic and create a new Project. Select Windows Form New Project window. You will save this project in your CS 3 folder and name it as: yourlastname-firstname-Grader.
  2. In this project user inputs three test scores, a button calculates the average and displays the average and grade. Another button clears the entries.
  3. Create a form with seven labels, three textboxes and two buttons, similar to below form layout with each control.
  4. Here are the properties of the form and each control:
  5. Form: change the title of the form to: <Your Name> - Grader
  6. Label1, Text: Test1; Name: leave as is, you don’t use labels in the program
  7. Label2, Text: Test2; Name: leave as is
  8. Label3, Text: Test3; Name: leave as is
  9. Label4, Text: Average; Name: leave as is
  10. Label5, Text: Grade; Name: leave as is
  11. Label6, Text: blank; Name: lblAverage ; BorderStyle: Fixed 3D; AutoSize: False
  12. Label7, Text: blank; Name: lblGrade ; BorderStyle: Fixed 3D; AutoSize: False
  13. Textbox1, Test: blank; Name: txtTest1
  14. Textbox2, Test: blank; Name: txtTest2
  15. Textbox3, Test: blank; Name: txtTest3
  16. Button1, Text: Calculate Average; Name: btnCalcAvg
  17. Button2, Text: Clear; Name: btnClear
  18. Write a Visual Basic program that: 1) accepts three scores, 2) computes the average and assigns the grade.
  19. You declare four variables as Integer data type. They are: Test1, Test2, Test3, and Average.
  20. You create an IF…ELSEIF… structure to assign grades using this logic. Note: No need to create a loop:
  21. To assign Letter Grade use this criteria: Average <60, F; Average <70, D; Average < 80, C; Average < 90, B; Average <=100, A.
  22. To do this you write the code in Calculate Average button procedure. First declare the variables that will get test scores (intTest1, intTest2, intTest3) from textboxes and another one (intAverage) for calculating the tests average. Then assign textbox entries into the first three variables. Then calculate the Average and finally based on the Average assign a Letter Grade.
  23. Clear button clears the entries in Test1, Test2, Test3 textboxes and in Average and Grade labels. Then program is ready to take another set of test scores.Ready to enter another set of numbers.
  24. After creating the following form layout in Visual Basics (see assignment 8 on how to create a new project). Make sure to name the controls according to above steps 11 - 17.
  25. Double-click on Calculate Average, you will placed in Code window to write code:
  26. Declare 4 variables: intTest1, intTest2, intTest3, intAverage as Integer.
  27. Assign textbox entries for three scores into intTest1, intTest2, intTest3 variables, Example: intTest1 = txtTest1.Text
  28. Calculate Average, develop an expression to sum three tests values and divide by 3. Store Average into intAverage variable.
  29. Then develop nested IF … THEN … ELSEIF … ELSEIF selection structure to evaluate Average and assign a Letter Grade.
  30. You display the average and assigned grade in Average and Grade label controls
  31. We have reviewed similar nested selection structure in Selection slides.
  32. You may want to start with a similar code below and make sure to make the necessary changes. Before starting to build IF statement, don’t forget to declare the variables and assign Test1, Test2, Test3 to their corresponding variables. Also calculating the Average of three tests:

     If Average < 60 Then

            lblAvg.Text = Average

            lblGrade.Text = "F"

        ElseIf Average < 70 Then

            lblAvg.Text = Average

            lblGrade.Text = "D"

        ElseIf Average < 80 Then

            lblAvg.Text = Average

            lblGrade.Text = "C"

        ElseIf Average < 90 Then

            lblAvg.Text = Average

            lblGrade.Text = "B"

        ElseIf Average < 100 Then

            lblAvg.Text = Average

            lblGrade.Text = "A"

        End If

  1. To program Clear button, double-click on Clear button on the form.
  2. Type the code to clear the textboxes and label controls entries:
  3. You can use the following sample code:

txtTest1.Text = ""

  lblAvg.Text = ""

lblGrade.Text = ""

                         

Form layout with controls

In: Computer Science

This is an assignment done using the terminal of linux. In this assignment, you will •...

This is an assignment done using the terminal of linux.

In this assignment, you will

• use make to modify a c++ program and

• gdb a debugging tool.

Part 1

From the course website (or the departmental dropbox) download the program source files for the project myname.

Part 2: myname program (5 points)

1. Using your favorite text editor, modify the source code to print out your name instead of mine when the binary file is executed. Hint: YOU ARE NOT ”THOMAS THE TANK ENGINE”

2. Modify the makefile to include a rule that creates a backup of the source files, makefile, and readme in an archive directory in your home directory structure.

Submit a compressed, archived tar file [yourUserID].assignment4_1.tar.[Z,gz] with your modified source code.

3. Use the gdb debugger to step through the program. Check to ensure the Makefile is modified to allow for debugging. Submit a text file [yourUserID].assignment4_2.txt containing the gdb output for the following sequence of commands:

gdb myname

start

step [issue this command until you get the “program exited normally” message]

quit

Submission This time, there should be two files that you are uploading

[yourUserID].assingment4_1.tar.[Z,gz] and [yourUserID].assingment4_2.txt

• When you have finished, submit the files using the departmental dropbox.

Here are the contents of CSCE215 directory that contains the program and files associated with it:

main.cpp

#include <iostream>
#include <string>
using namespace std;
#include "name.h"

int main () {
        name myName;

        myName.SetLast(LAST);
        myName.SetMiddle(MI);
        myName.SetFirst(FIRST);

        cout <<"My name is: ";
        myName.PrintFirst();
        myName.PrintMiddle();
        myName.PrintLast();
  
        return 0;
}

Makefile

# makefile to build a program

# program depends on components: name and main
myname:      main.o name.o
   g++ -g main.o name.o -o myname

# name.cpp has it's own header file
name.o:        name.cpp name.h
   g++ -c -g name.cpp

# main.cpp also uses the header file name.h
main.o:           main.cpp name.h
   g++ -c -g main.cpp

clean:
   /bin/rm -f myname *.o

name.cpp

#include <iostream>
#include <string>
using namespace std;
#include "name.h"

void name::GetFirst(string str) {
   str=first;
}

void name::SetFirst(string str) {
   first=str;
}

void name::GetMiddle(string str) {
   str=middle;
}

void name::SetMiddle(string str) {
   middle=str;
}

void name::GetLast(string str) {
   str=last;
}

void name::SetLast(string str) {
   last=str;
}

void name::PrintLast() {
   cout << last << "\n";
}
void name::PrintMiddle() {
        cout << middle;
}
void name::PrintFirst() {
        cout << first;
}

name.h

#define LAST   "tankengine"
#define MI   "the "
#define FIRST   "thomas "

class name {

   private:
   string first;
   string middle;
   string last;
  
   public:
   void SetFirst(string str);
   void GetFirst(string str);
  
   void SetMiddle(string str);
   void GetMiddle(string str);
  
   void SetLast(string str);
   void GetLast(string str);

   void PrintLast();
   void PrintMiddle();
   void PrintFirst();
  
};

readme

/*
Copyright: 2005, All rights reserved.
Program: myname
Version: 1.1
Created: 9/6/05
Revised: 1/22/09
Files: name.cpp, name.h, main.cpp, Makefile
Programmer: Patrick O'Keefe who gratefully acknowledges Dr. Jason Bakos's kind assistance.
Course: CSCE-215
Assignment: Class Project
Compiler: GNU Gcc version 4.2.3
Target: Linux

Description:

This program attempts string assigment. and other stuff....

Revisions:

There have been no major revisions of this program.

Constants and Variables:

See code for constant and variable descriptions.
or
you could put that kind of info here. Like:
   FIRST -> your first name
   MIDDLE -> ditto
   LAST -> and ditto.
ok here is a change.

ALL OF THOSE FILES ARE LOCATED IN A DIRECTORY /CSCE215


In: Computer Science

Data from the Rand Health Insurance Experiment indicated that: price has no impact on the utilization...

  1. Data from the Rand Health Insurance Experiment indicated that:
  1. price has no impact on the utilization of health care.
  2. increased price is related to increased use of health care.
  3. increased price is related to decreased use of health care.
  4. increased price first increases, then decreases use of health care.
  5. None of the above.

In: Economics

In an experiment, where we need to isolate lipids from horse red blood cells, one of...

In an experiment, where we need to isolate lipids from horse red blood cells, one of the steps is too "Add 100µL of choloform;methanol (9:1) and mix vigorously to dissolve the membrane lipids. "

What happens in this step, what would happen if you added water instead of chloroform/methanol?

In: Biology

briefly describe the Urey-Miller experiment, then identify the significance (i.e. what did it tell us about the origin of life?).

 

  1. briefly describe the Urey-Miller experiment, then identify the significance (i.e. what did it tell us about the origin of life?).

  2. Pick an animal, then define the species using the biological species concept.

  3. Compare and contrast analogous and homologous structures.

  4. Compare and contrast microevolution and macroevolution.

  5. Compare and contrast background and mass extinctions.

In: Biology