Questions
Problem Statement You are required to read in a list of stocks from a text file...

Problem Statement
You are required to read in a list of stocks from a text file “stocks.txt” and write the sum and
average of the stocks’ prices, the name of the stock that has the highest price, and the name of
the stock that has the lowest price to an output file. The minimal number of stocks is 30 and
maximal number of stocks in the input file is 50. You can download a input file “stocks.txt” from
Canvas. When the program runs, it should do the following:
 May or may not use the Stock Class created in Assignment 6 and modify it as it is
needed.
 The Stock class must have a constructor with 3 parameters that correspond to the 3 fields:
Stock Name, Symbol, Price.
o For the argument constructor, set the value of 3 fields based on the arguments.
 The Stock class must have accessors and mutators for all of its private fields.
 The setter methods must protect a user from setting the price into negative number. You
can set the values to 0 if a user tries to change them to negative values.
 The program will ask user to enter a name of the input file. If the input file does not exist,
the program should print an error message and terminate immediately.
o To check if a file opens successfully, please use the following example as a
reference:
File myFile = new File(“stocks.txt”);
if (!myFile.exists()){
System.exit(0);
}
 If the file opens successfully, then the program reads stocks’ information and store it into
an array of stocks. Each element of the array MUST be a Stock object. You should use
ArrayList class.
 The program calculate the sum and average of the stocks’ prices.
 The program finds the name of the stock with the highest price and the name of the stock
with the lowest price.
 The program asks user to enter a name for an output file. Then it creates the output file
and write the sum, average, names of the stocks with highest and lowest price to the file.
Input
This program requires that you read in the following data values:
 An input file name.
 An output file name.
 An input file that contains a list of stocks with their name, symbol, current price. Each
line represents one stock and each field is separated by comma. The file MUST contain
at least 30 stocks.
o E.g., Microsoft Corporation, MSFT, 23.34
Google Inc, GOOG, 786.79
Bank of America, BAC, 16.76
AT&T Inc, T, 34.54
You will use interactive I/O in this program. All of the input must be validated if it is needed.
You can assume that for a numeric input value, the grader will enter a numeric value in the
testing cases.
Output
Your program should display the sum and average of the list of stocks, the name of the stock
with highest price and the name of the stock with lowest price on the console, and then write
them to a file

Assignment 6
You are required to write a stock price simulator, which simulates a price change of a stock.
When the program runs, it should do the following:
 Create a Stock class which must include fields: name, symbol, currentPrice, nextPrice,
priceChange, and priceChangePercentage.
 The Stock class must have two constructor: a no-argument constructor and a constructor
with four parameters that correspond to the four fields.
o For the no-argument constructor, set the default value for each field such as:
Name: Microsoft
 Symbol: MSFT
 currentPrice: 46.87
 nextPrice: 46.87
o For the argument constructor, set the value of four fields based on the arguments.
 The Stock class must have accessors and mutators for all of its fields.
 The setter methods must protect a user from setting the currentPrice/nextPrice into
negative number. You can set the values to 0 if a user tries to change them to negative
values.
 The Stock class should have a SimulatePrice() method, which increases or decreases the
currentPrice by 0 - 10% randomly, including 0.00% and 2.34%.
 The main program will ask user to enter a name, symbol, current price of a stock. Then, it
simulates the prices for next 30 days. It displays the prices for the next 30 days on the
console. If a user enters “NONE”, “NA”, 0.0 for name, symbol, current price
respectively, then the no-argument constructor is used. Input
This program requires that you read in the following data values:
 A stock’s name, symbol, and current price.
o E.g., Microsoft Corporation, MSFT, 45.87.
You will use interactive I/O in this program. All of the input must be validated if it is needed.
You can assume that for a numeric input value, the grader will enter a numeric value in the
testing cases.
Output
Your program should display the stock’s name, symbol, current price, next price
priceChange, and priceChangePercentage for each day on the console.
Test case output: (green texts are user input)
Please enter the name of the stock: Microsoft
Please enter the symbol of the stock: MSFT
Please enter yesterday's price of Microsoft: 45.65
STOCK SYMBOL YESTERDAY_PRICE TODAY_PRICE PRICE_MOVEMENT CHANGE_PERCENT
Microsoft MSFT 45.65 47.48 1.83 4.00%
Microsoft MSFT 47.48 52.22 4.75 10.00%
Microsoft MSFT 52.22 49.61 -2.61 -5.00%
Microsoft MSFT 49.61 47.13 -2.48 -5.00%
Microsoft MSFT 47.13 51.84 4.71 10.00%
Microsoft MSFT 51.84 57.03 5.18 10.00%
Microsoft MSFT 57.03 54.18 -2.85 -5.00%
Microsoft MSFT 54.18 59.05 4.88 9.00%
Microsoft MSFT 59.05 62.01 2.95 5.00%
Microsoft MSFT 62.01 57.05 -4.96 -8.00%
Microsoft MSFT 57.05 54.19 -2.85 -5.00%
Microsoft MSFT 54.19 49.32 -4.88 -9.00%
Microsoft MSFT 49.32 46.85 -2.47 -5.00%
Microsoft MSFT 46.85 50.60 3.75 8.00%
Microsoft MSFT 50.60 55.15 4.55 9.00%
Microsoft MSFT 55.15 58.46 3.31 6.00%
Microsoft MSFT 58.46 61.38 2.92 5.00%
Microsoft MSFT 61.38 55.86 -5.52 -9.00%
Microsoft MSFT 55.86 56.42 0.56 1.00%
Microsoft MSFT 56.42 56.98 0.56 1.00%
Good bye!

In: Computer Science

Draw a UML diagram for the classes. Code for UML: // Date.java public class Date {...

Draw a UML diagram for the classes.

Code for UML:

// Date.java

public class Date {
  
   public int month;
   public int day;
   public int year;

   public Date(int month, int day, int year) {
   this.month = month;
   this.day = day;
   this.year = year;
   }
  
   public Date() {
   this.month = 0;
   this.day = 0;
   this.year = 0;
   }
}

//end of Date.java

// Name.java

public class Name {
  
   public String fname;
   public String lname;

   public Name(String fname, String lname) {
   this.fname = fname;
   this.lname = lname;
   }
  
   public Name() {
   this.fname = "";
   this.lname = "";
   }
}

//end of Name.java

// Address.java

public class Address {
  
   public String street ;
   public String state ;
   public String city;
   public int zipcode;

   public Address(String street, String state, String city, int zipcode) {
   this.street = street;
   this.state = state;
   this.city = city;
   this.zipcode = zipcode;
   }
  
   public Address() {
   this.street = "";
   this.state = "";
   this.city = "";
   this.zipcode = 0;
   }
}

//end of Address.java

// Employee.java

public class Employee {
  
   public int number;
   public Date mydate;
   public Address myadress;
   public Name myname;

   public Employee(int number, Name myname, Date mydate, Address myadress) {
   this.number = number;
   this.mydate = mydate;
   this.myadress = myadress;
   this.myname = myname;
   }
  
   public Employee() {
   this.number = 0;
   this.mydate = new Date();
   this.myadress = new Address();
   this.myname = new Name();
   }
  
   // method to display the details of the Employee
   public void display()
   {
       System.out.println("Number: "+number);
       System.out.println("Name: "+myname.fname+" "+myname.lname);
       System.out.println("Data: "+mydate.month+"/"+mydate.day+"/"+mydate.year);
       System.out.println("Address: "+myadress.street+" "+myadress.city+", "+myadress.state+", "+myadress.zipcode);
   }
}
// end of Employee.java

// SalariedEmployee.java

public class SalariedEmployee extends Employee
{
   public double salary;
  
   // parameterized constructor
   public SalariedEmployee(int number, Name myname, Date mydate, Address myadress, double salary)
   {
       super(number, myname, mydate, myadress); // call Employee's constructor
       this.salary = salary;
   }
  
   // default constructor
   public SalariedEmployee()
   {
       super();
       this.salary = 0;
   }
  
   // override Employee's display method to display the additional details
   public void display()
   {
       super.display();
       System.out.printf("Salary: $%,.2f\n",salary);
   }
}
//end of SalariedEmployee.java

// HourlyEmployee.java

public class HourlyEmployee extends Employee
{
   public double pay_rate;
   public int hours_worked;
   public double earnings;
  
   // parameterized constructor
   public HourlyEmployee(int number, Name myname, Date mydate, Address myadress, double pay_rate, int hours_worked)
   {
       super(number, myname, mydate, myadress);
       this.pay_rate = pay_rate;
       this.hours_worked = hours_worked;
       // calculate earnings
       if(hours_worked <= 40) // no overtime
           earnings = this.pay_rate*this.hours_worked;
       else // overtime
           earnings = this.pay_rate*40 + (this.hours_worked-40)*1.5*this.pay_rate;
   }
  
   // default constructor
   public HourlyEmployee()
   {
       super();
       pay_rate = 0;
       hours_worked = 0;
       earnings = 0;
   }
  
   // override display method
   public void display()
   {
       super.display();
       System.out.printf("Pay rate: $%,.2f\n",pay_rate);
       System.out.println("Hours Worked: "+hours_worked);
       System.out.printf("Earnings: $%,.2f\n",earnings);
   }
}
//end of HourlyEmployee.java

// Employeeinfo.java

public class Employeeinfo {
  
   public static void main(String[] args)
   {
       // create SalariedEmployee
       SalariedEmployee s = new SalariedEmployee(12, new Name("Shaun","Marsh"), new Date(11, 7, 1995), new Address("Street1","State1","City1",70081), 75000);

       // create HourlyEmployee without any overtime
       HourlyEmployee h1 = new HourlyEmployee(15, new Name("Harry","Doe"), new Date(7, 16, 2000), new Address("Street2","State2","City2",60181), 45.75, 35);

       // create HourlyEmployee with overtime
       HourlyEmployee h2 = new HourlyEmployee(25, new Name("Jerry","Hope"), new Date(10, 16, 2007), new Address("Street3","State3","City3",80111), 45.75, 45);
      
       // display the details
       s.display();
       System.out.println();
       h1.display();
       System.out.println();
       h2.display();
   }

}


//end of Employeeinfo.java

In: Computer Science

Write a C program that prompts the user to enter some information about up to 20...

Write a C program that prompts the user to enter some information about up to 20 individuals (think of a way to welcome and prompt the user). It must be stored in a structure. Once data is entered, the program output it as shown in sample run below. Your program should include a structure with a tag name of: “information”. It should contain the following data as members: a struct to store employee's name, defined as: struct name fullname e.g. a float to store employee's pay_rate, a float to store employee's hours, a float to store employee's retirement percentage, a struct to store a hire date, defined as: struct date the data type struct name will consist of: char last_name[20]; char first name [15]; char middle initial[1]; and the data type struct date: int yyyy; int mm; int dd; You need to define an array of type: struct information. You can call this array: employees[20] or whatever name you wish. Use a 21% tax rate. The dialog with the user must be as follows:

Whatever Title you want Here

How many employees do you wish to process? 2

Employee #1: Enter first name: Minnie

Enter last name: Mouse

Enter middle initial:

Enter hours worked: 40

Enter pay_rate: 33.50

Enter 401K percentage:.03

Enter hire date (mm/dd/yyyy): 01/02/1993

Employee #2:

Enter first name: Johnny

Enter last name: Carson

Enter middle initial: M Enter hours worked: 30

Enter pay_rate:

50 Enter 401K percentage: .025

Enter hire date (mm/dd/yyyy): 11/10/1942 /

*After the entries a report will come out. You may design it yourself or use this sample as a template. Make sure decimals align!! */

Jim's Employees Payroll Report – 9/22/2020 --------------------------------------------------------

Name Hire Date Hrs Rate Gross Pay Taxes 401K Net Pay Mouse Minnie 01/02/1993 40.00 33.50 1340.00 281.40 40.20 1018.40 Johnny M Carson 11/17/1942 30.00 50.00 1500.00 315.00 37.50 1147.50 Total Payroll 70.00 83.50 2840.00 596.40 77.70 2165.90 Note:

The black text represents the "output" from your program and is shown for clarity only here. Also note that what the user types in is indicated by the blue area above. I also did not show examples of data validation – which you can handle in your own way. Hints/other requirements: • Use safer_gets to read in character array data. • You should use %di (instead of %i) as the format specifier for the date fields because if you enter an integer item starting with the number 0 (zero), C will interpret that number as "octal", which will cause erroneous results. For this reason, I recommend that you use %d in the scanf statement when prompting the user for any int type data. • You do not need to use user-defined functions or string functions in this program (however, feel free to if you'd like to). • You are not permitted to use pointers in this program. (That will be in another assignment!) • You may use some string functions from the notes and chat sessions • You need to perform validation on all the fields entered except the name. • The date can have any label you wish, like birth date, hire date, etc. • For 3 points extra credit you can have the report the current date. Good luck! (Carry On by Crosby, Stills, Nash & Young plays in the background…) (my apologies for any typos found in the description above)

In: Computer Science

Write a C program that prompts the user to enter some information about up to 20...

Write a C program that prompts the user to enter some information about up to 20 individuals (think of a way to welcome and prompt the user). It must be stored in a structure. Once data is entered, the program output it as shown in sample run below.

Your program should include a structure with a tag name of: “information”. It should contain the following data as members:

a struct to store employee's name, defined as: struct name fullname e.g. a float to store employee's pay_rate,
a float to store employee's hours,
a float to store employee's retirement percentage,

a struct to store a hire date, defined as:

the data type struct name will consist of: char last_name[20];
char first name [15];
char middle initial[1];

and the data type struct date: int yyyy;
int mm;
int dd;

struct date

You need to define an array of type: struct information.
You can call this array: employees[20] or whatever name you wish. Use a 21% tax rate. The dialog with the user must be as follows:

Whatever Title you want Here
How many employees do you wish to process? 2

Employee #1:
Enter first name: Minnie
Enter last name: Mouse
Enter middle initial:
Enter hours worked: 40
Enter pay_rate: 33.50
Enter 401K percentage: .03
Enter hire date (mm/dd/yyyy): 01/02/1993

Employee #2:
Enter first name: Johnny Enter last name: Carson Enter middle initial: M

Enter hours worked: 30
Enter pay_rate: 50
Enter 401K percentage: .025
Enter hire date (mm/dd/yyyy): 11/10/1942

/*After the entries a report will come out. You may design it yourself or use this sample as a template. Make sure decimals align!! */

Name

MouseMinnie Johnny M Carson

Total Payroll

Jim's Employees Payroll Report – 9/22/2020 --------------------------------------------------------

Hire Date Hrs Rate Gross Pay Taxes 401K Net Pay

01/02/1993 40.00 33.50 1340.00 281.40 40.20 1018.40 11/17/1942 30.00 50.00 1500.00 315.00 37.50 1147.50

70.00 83.50 2840.00 596.40 77.70 2165.90

Note: The black text represents the "output" from your program and is shown for clarity only here. Also note that what the user types in is indicated by the blue area above. I also did not show examples of data validation – which you can handle in your own way.

Hints/other requirements:

  • Use safer_gets to read in character array data.

  • You should use %di (instead of %i) as the format specifier for the date fields because if you

    enter an integer item starting with the number 0 (zero), C will interpret that number as "octal", which will cause erroneous results. For this reason, I recommend that you use %d in the scanf statement when prompting the user for any int type data.

  • You do not need to use user-defined functions or string functions in this program (however, feel free to if you'd like to).

  • You are not permitted to use pointers in this program. (That will be in another assignment!)

  • You may use some string functions from the notes and chat sessions

  • You need to perform validation on all the fields entered except the name.

  • The date can have any label you wish, like birth date, hire date, etc.

  • For 3 points extra credit you can have the report the current date.

In: Computer Science

Every time I run this code I get two errors. It's wrote in C# and I...

Every time I run this code I get two errors. It's wrote in C# and I can't figure out what I'm missing or why it's not running properly. These are two separate classes but are for the same project.

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RecursiveMethod
{
    class Program
    {
        static bool ordering = true;
        static string str;
        static int quantity = 0;
        static string Invoic = string.Empty;
        static double itemPrice;
        static double totalCost = 0;
        static void Main(string[] args)
        {
            int menuOption;
            int Item = 0;

            Console.WriteLine("Enter your FirstName"); //First Name 
            string sFirstName = Console.ReadLine();

            Console.WriteLine("Enter your LastName"); //Last Name
            string sLastName = Console.ReadLine();

            Console.WriteLine("Enter your ID"); //Last Name
            string sStudentID = Console.ReadLine();

            str = sFirstName + sLastName;

            //Call this methos to show student info staring of the programm
            displayStudentInfo(str,sStudentID);

            //display your message function
            displayMessage(str);


            string invoice = string.Empty;
            while (ordering)
            {
                Console.WriteLine("Enter your item");
                menuOption = Convert.ToInt32(Console.ReadLine());
                double cost;
                
                switch (menuOption)
                {
                    case 1:
                        Item = 1;
                        ProgressLogic.addItem(1, invoice, out Invoic, out quantity,out itemPrice);
                        invoice = Invoic;
                        cost = displayTotal(itemPrice, quantity);
                        break;
                    case 2:
                        Item = 2;
                        ProgressLogic.addItem(2, invoice, out Invoic, out quantity, out itemPrice);
                        invoice = Invoic;
                        cost = displayTotal(itemPrice, quantity);
                        break;
                    case 0:                       
                        done(totalCost, invoice);
                        Console.ReadLine();
                        break;
                    default:
                        Console.WriteLine("Invalid Option");
                        break;
                }
            }

        }

        /// <summary>
        /// Show the Message
        /// </summary>
        /// <param name="str"></param>
        public static void displayMessage(string str)
        {
            Console.WriteLine("Welcome " + str + " to dave onlines coffee shop");
        }

        /// <summary>
        /// Show the Student Info
        /// </summary>
        /// <param name="studentFullName"></param>
        /// <param name="iStudentID"></param>
        public static void displayStudentInfo(string studentFullName, string iStudentID)
        {
            Console.WriteLine("Welcome " + studentFullName + " Student ID - " + iStudentID);
            Console.WriteLine("Please choose the following Products code. Enter 0 to Exit");
            Console.WriteLine("Product 1 kona bled -> $14.95");
            Console.WriteLine("Product 2 cafe verona -> $9.95");
        }

        /// <summary>
        /// Done Method to show the information based on the total cost calculations
        /// </summary>
        /// <param name="totalCost"></param>
        public static void done(double totalCost, string strInvoice)
        {
            ordering = false;
            Console.WriteLine("Customer Name");
            Console.WriteLine("\n"+ strInvoice);
            Console.WriteLine("\n"+"Total Cost"+ totalCost + "$");
        }

        /// <summary>
        /// Disaply the total cost
        /// </summary>
        /// <param name="itemPrice"></param>
        /// <param name="quant"></param>
        /// <returns></returns>
        public static double displayTotal(double itemPrice, double quant)
        {
            double cost = (itemPrice * quant);
            totalCost += cost;
            return totalCost;
        }
    }
}
using Microsoft.SqlServer.Server;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RecursiveMethod
{
    public class ProgressLogic
    {
       
       //This method will do the programming logic and will return the calculations in the out parameter       
        public static double addItem(int item, string oldInvoiceString, out string Invoice, out int quantity, out double itemPrice) {
           //we need to initialize the out parameters first so definitily it will some value instead of nothig
           //ow it will show error
            Invoice = "";
            quantity = 0;
            itemPrice = 00.00;
            
            if (item == 1) {
                itemPrice = 14.95;
                Console.WriteLine("Enter Quantity"); //Last Name
                quantity = Convert.ToInt32( Console.ReadLine());
                Invoice = oldInvoiceString + " Product 1 kona Blend -> $" + itemPrice + " * " + quantity + " = " + itemPrice * quantity + "\n";
            }

            if (item == 2)
            {
                itemPrice = 9.95;
                Console.WriteLine("Enter Quantity"); //Last Name
                quantity = Convert.ToInt32(Console.ReadLine());
                Invoice = oldInvoiceString + "Product 2 cafe verona-> $" + itemPrice + " * " + quantity + " = " + itemPrice * quantity + "\n";
            }

            return itemPrice;
        }

        
    }
}

In: Computer Science

Pre-lab Activities Practice the Scientific Method Step 1. Observation. Write down something surprising that you noticed...

Pre-lab Activities

  1. Practice the Scientific Method

Step 1. Observation. Write down something surprising that you noticed this week and you don’t understand. NOTE: if you can’t think of anything interesting that happened this week, you may use an example from any part of your life.

EXAMPLE: This morning I woke up and there was a dead raccoon on my front doorstep!

Observation(s):

This morning I woke up and the tree in me from the yard had fallen over.

Step 2 Question. Write down a question that you have about the observation from step one (what more would you like to know about what was observed?).

HINTS: As a rule, you want to think like a reporter and ask factual cause and effect questions – questions that begin with what, when, where, why or how. More subjective questions (e.g. concerning morality) may be better addressed by the application of philosophical or ethical principles and may be difficult (or impractical) to address using science alone. Aim for a question that is likely to have a definitive answer (even though you don’t know what the answer is). The more specific you make your question, the easier it may be to test.

EXAMPLE: What caused the raccoon to die?

Question(s):

What caused the tree to fall over?

When did the tree fall over?

Why did the tree fall over?

Step 3 Hypothesis. Propose an explanation for the observation. A hypothesis must be something that can be tested. IMPORTANT: you do not know ahead of time if this explanation is correct – the beauty of science is that even if your hypothesis is wrong that is OK!! It is often wise to initially create as many reasonable hypotheses (i.e. possible explanations) as you can and to start by testing the one you think is most likely to be true.

EXAMPLE: The raccoon had rabies.

Hypothesis:

The roots of the tree were damaged/weak causing the tree to fall.

Heavy winds last night caused the tree to fall.

Step 4 Investigation. Next design a way to test if your hypothesis is correct or incorrect. One way is to think about the implications of your hypothesis and use it to make predictions that can be tested. NOTE: you do not need to have the expertise to do the test you propose if it is possible. This is just a hypothetical scenario.

EXAMPLE: IF the raccoon died of rabies, THEN it should still have antibodies against the rabies virus in its bloodstream. TO TEST THIS, WE COULD test the raccoon’s blood.

Predictions of a hypothesis (IF… THEN…), and ways to test it (TO TEST THIS WE COULD…):

Step 5 Analysis

Normally you would conduct the experiment in step 4 and collect data. Discuss what data you might collect from your test(s) and how you would interpret it – remember you are trying to collect information that allows you to answer a question; try to think of all the possible results you might get from your test.

EXAMPLE: The raccoon’s blood test could come back positive indicating that it did have rabies, or it could be negative indicating that it died of other causes.

Analysis (POSSIBLE RESULT “X” WOULD MEAN…; POSSIBLE RESULT “Y” WOULD MEAN…):

Step 6 Conclusion

This is where you decide if, based on your data, your hypothesis is accepted or rejected. If accepted, we may want to run the test again or make new predictions and design new tests to verify that our hypothesis is supported. If rejected, may want to modify it or generate a different hypothesis. We don’t have real data yet so now let’s pretend the hypothesis is rejected. Come up with an alternative hypothesis.

EXAMPLE: If we find the rabies test was negative, this would mean our hypothesis is rejected. Another hypothesis that we could test is whether the raccoon was killed by an animal and dragged onto the porch.

Conclusion:       

  1. Experimental Design

In order to make scientific investigations meaningful and to minimize bias, scientists must use well-designed experiments. It is vital to be aware of variables that could impact the results, use standards (i.e. controls) in order to validate results and keep an open mind to the possibility that a hypothesis may be supported or rejected.

The following scenario will be used to illustrate how variables, controls, and experimental design can be properly implemented in an experimental setting. Refer to this scenario to answer the questions below.

A team of doctors wants to find out if the daily consumption of olive oil affects breast cancer rates in women. Rationale: Olive oil contains oleic acid, a monounsaturated fat that lowers the levels of a protein produced by a breast cancer gene in women (Her-2/neu). The doctors hypothesize that increased consumption of olive oil will reduce the incidence of breast cancer in women.

Independent variable: a factor that is expected to cause an effect; manipulated by the experimenter.

  1. What is the independent variable for the above scenario?

Dependent variable: a factor that changes as a result of the independent variable; a factor that you will measure.

  1. What is the dependent variable for the above scenario?

Controlled variables: things that could interfere with experimental results; must stay the same for all groups in your experiment! There are often many controlled variables for an experiment.

  1. What are the two controlled variables for the above scenario?

In addition to determining the independent, dependent and controlled variables for an experiment, the scientist must also determine exactly how to set up the experiment. This is called experimental design.

Experimental groups: individuals/subjects that experience the manipulated independent variable. An experiment might have just one experimental group or it could have multiple experimental groups.

  1. For the scenario above, describe an appropriate experimental group.

Control group: Don’t confuse this with controlled variables! The control group consists of individuals/subjects that do not experience the manipulated independent variable. The control group allows for a conclusion that changes in the experimental group(s) caused by independent variables.

  1. For the scenario above, describe an appropriate control group.

Lab Activity: Isopod food and smell preferences?

You will now proceed to apply the concepts you have learned to design your own scientific investigation. The subjects you will study are isopods (also known as pill bugs, potato bugs and sow bugs). You will work as a group to test the smell or food preferences of isopods. Be gentle while handling these animals since these are your experimental subjects and you do not want them to die. We also have a limited supply of pill bugs.

Figure 1: Isopods are a type of arthropod. Arthropods are animals that have jointed legs and an exoskeleton. Other arthropods include insects, spiders, and crabs. Isopods typically feed on decaying matter and sometimes live plants. Their bodies are dark gray to white and divided into a head, thorax, and abdomen. The abdomen is subdivided into seven segments, and they have seven pairs of walking legs. Isopods are often found in dark, moist places because they hide from predators and because they breathe through gills, which must be kept moist in order to exchange gasses with the surrounding air.

This is one question, for experiment Overview.
Working as a group, design an experiment to determine the food or smell preferences for the isopods. You will have several possibilities to choose from including food choice (crackers, cat food, apple) and smell preferences (various essential oils and spices).

The experiments will be carried out in an apparatus made of multiple experimental chambers connected by openings that allow the isopods to move from one to the next. You should give the isopods 2 options, placing one in each experimental chamber as shown below. In this investigation, you will be using a control chamber rather than a control group. The control chamber will not have any options placed in it and will serve as a reference to compare the preferences of the isopods. Designate the small middle chamber as the control chamber.

Using 10 isopods, you will give the isopods free access to all chambers for 10 minutes. Every minute, you will count how many isopods are in each chamber.

Experimental chamber 1 with Option 1 control Experimental chamber 2 with Option 2

1.   Design your experiment; complete the chart below for your experiment:

What question are you trying to answer with your experiment?

State your hypothesis.

If your hypothesis is correct, what do you predict will happen?

Independent variables (what you are testing)

Dependent variable (what you are measuring)

Controlled factors (things that are the same for all chambers)
Graph. Vertical horizontal


What is the control for this experiment?

2.   Set up your experiment. Obtain one chamber apparatus with 2 experimental chambers and a middle section. Place the options you are testing in separate chambers of the apparatus and place nothing into the small middle chamber.

When placing the options in the experimental chambers, follow these guidelines:
a.   Use small amounts of material placed throughout the experimental chamber rather than in one pile in the middle.
b.   Chop or grind food options so that the food is accessible to the small isopods.
c.   Control for the amount of material used. Use the scales to weigh out equal amounts of each option to place in each experimental chamber.

3.   Obtain ten (10) isopods from the instructor and place them in the control (middle) chamber. Use the supplied gates to block access to the experimental chambers. Cover the control chamber with the supplied lid for 5 minutes to allow the isopods to acclimate to their new environment. Be sure to place the lids on the experimental chambers before starting your experiment.

4.   After the acclimation period, track the isopods movement every minute for a total duration of 10 minutes. Record the number of isopods in each chamber at each time point in the table provided below.

Table of # isopods in each experimental chamber:
Time (min) 0, 1, 2 , 3 ,4 ,5, 6, 7, 8, 9, 10
Control
Option 1:
Option 2:

5.   After the 10-minute experimental period is over, carefully remove the isopods from the experimental apparatus and return them (gently!) to their terrarium.

6.   Clean up your experiment including cleaning out, drying and putting away the experimental apparatus. Throw away ground-up or chopped up food options as well as used filter paper.

7.   On the following page, make a bar graph of your results.

a.   Graph the number of isopods on the vertical (y) axis and the time (minutes) on the horizontal (x) axis.
b.   Your graph should include a title, labeled axes, and a legend.
Graph. Vertical horizontal
1to 10 vertical # of isopods chamber.
1to 10 horizontal minutes.


Post Lab questions:

1.   Based on your data, do you accept or reject your hypothesis? State your findings and refer to your actual data. If your hypothesis was rejected or if your data was inconclusive, that’s ok! It happens all the time in science and is part of the process (although not discussed much).

2. If you were to do this experiment again, what would you change about your experimental design? What would you keep the same?

In: Biology

You have recently joined an established, medium sized firm of auditors as a junior partner.


1. You have recently joined an established, medium sized firm of auditors as a junior
partner. Because of your knowledge of the relevant pronouncement, Sam Sandman, the
senior partner, discussed the following situations with you:


2. Your firm acts as auditors to Small Ltd and as financial advisers to Ben Big, one of
Its directors. Ben Big had instituted a legal action against the company for breach of
contract and has sought your firm’s advice relating to certain financial aspects
relating to Small Ltd. (5)


3. The chief accountant of Cruz Ltd, a public, but unlisted company, audited by your
firm, left unexpectedly. The company has asked your firm to maintain its accounting
records for the remaining three months of its financial year until they can appoint a
suitable accountant. (5)

4. Your firm acts as auditors to Rex (Pty) Ltd, a company required by its
Memorandum of Incorporation to be audited. Rex (Pty) Ltd has lent R5 million to
Blax (Pty) Ltd, a company of which Sam Sandman is the non- executive
chairman. (7)


5. Your firm has been approached by Calvin Ltd to provide a second opinion on
some financial information. Thorpe and Co, Calvin Ltd’s auditors provided the
original independent opinion but the directors of Calvin Ltd have indicated that
this was not the opinion they were expecting and hence have approached your
firm for the second opinion. The directors have also indicated that they do not
want your firm to contact Thorpe and Co and that as the opinion is required
urgently they will pay whatever fee your firm wishes to charge. (8)


Required:
Discuss each of the situations above in terms of the Code of Professional conduct. Include in
your answer the threats to professional conduct, threats to the fundamental principles and the
safeguards in the format as follows:

   Threat / Fundamental Principal / Safeguard

eg Self Review Threat / Objectivity / Audit is accountant

In: Accounting

You are asked to write a simple C++ phonebook application program. Here are the requirements for...

You are asked to write a simple C++ phonebook application program. Here are the requirements for the application.

  • read the contact information from a given input file (phonebook.txt) into a dynamically created array of Contact objects. Each line of the input line includes name and phone information of a contact. Assume that each name has a single part
  • Allow to perform operations on array of data such as search for a person, create a new contact or delete an existing contact

A sample run:

***MY PHONEBOOK APPLICATION***

Please choose an operation:

A(Add) | S (Search) | D(Delete) |L(List) |Q(Quit): A

Enter name: MARY SMITH

Enter phone: 5062396

A(Add) | S (Search) | D(Delete) |L(List) |Q(Quit): S

Enter name: MARY SMITH

Phone Number: 5062396

A(Add) | S (Search) | D(Delete) |L(List) |Q(Quit): L

BARBARA BROWN 4059171

ELIZABETH JONES 2736877

LINDA WILLIAMS 3532665

PATRICIA JOHNSON 973437

A(Add) | S (Search) | D(Delete) |L(List) |Q(Quit): D

Enter name: LINDA WILLIAMS

A(Add) | S (Search) | D(Delete) |L(List) |Q(Quit): L

BARBARA BROWN 4059171

ELIZABETH JONES 2736877

PATRICIA JOHNSON 973437

A(Add) | S (Search) | D(Delete) |L(List) |Q(Quit): Q

In: Computer Science

One tents has provided their per-unit sales and cost information for the year ended December 31,...

One tents has provided their per-unit sales and cost information for the year ended December 31, 2018. All per-unit costs below are based on the production and sale of 3,000 name tents. the relevant range is 0 - 3,500 tents

Sales $45

Costs

variable costs

direct materials 5

direct labor 7

Manufacturing Overhead 13

Period Costs 4

Fixed Costs

Manufacturing Overhead 5

Period cost 7

1. if 2000 tents are produced and sold, what is the product cost per tent?

2. what is the fixed cost per tent at 1000 tents( including costs) produced and sold?

3. what are the total fixed costs in this example at 2000 name tent (produced and sold)?

4. what are the total variable costs in this example at 2000 name tents (produced and sold)?

5. what are the total period costs at 2000 name tents(produced and sold)?

6. will Nancy's turn a profit if they sell 2000 name tents?

7. what is the cost equation of nancy's?

8. what is the contribution margin per unit?

9. how many units does nancy need to sell in order to break even if she them at the price listed at above?

10. if nancy expects to sell only 2000 tents, what price should she charge to break even?

In: Accounting

Create a new PHP document (Unit Objective 1) Write a comment similar to the following: "This...

  1. Create a new PHP document (Unit Objective 1)
  2. Write a comment similar to the following: "This is my first PHP document, which displays some data in the web browser"(Unit Objective 1)
  3. Assign your name as a string value into the variable labeled myName (Unit Objective 2)
  4. Assign 53870 numeric value into the variable named randomNumber (Unit Objective 2)
  5. Assign the name of the web browser and operating system of the user accessing the file into the variable named userAgent (Unit Objective 2)
  6. Assign the file name of the currently running script into the variable named fileName (Unit Objective 3)
  7. Assign the IP address from which the user is viewing the current page into the variable named ipAddress (Unit Objective 3)
  8. Use echo command in order to display some informative descriptions followed by the values of myNem, randomNumber, userAgent, fileName, and ipAddress variables in the web browser. Each informative description and the value pair whould be displayed on a separate line (Unit Objective 4)
  9. Save the file as myFirstPHP.php
  10. Create a folder within the public_html folder in your account in people.ysu.edu, name this folder as "e_commerce".
  11. Create another folder within the "e_commerce" folder you just created, and name this folder as "Assignment_1", and upload "myFirstPHP.php" file into the "Assignment_1" folder.
  12. Attach "myFirstPHP.php" file to your response to this assignment, and submit it.

In: Computer Science