Question 1
In: Nursing
When 0.601 g of biphenyl (C12H10) undergoes combustion in a bomb calorimeter, the temperature rises from 26.1 ∘C to 30.3 ∘C.
Find ΔErxn for the combustion of biphenyl in kJ/mol biphenyl. The heat capacity of the bomb calorimeter, determined in a separate experiment, is 5.86 kJ/∘C.
In: Chemistry
Can Lay out the design for two between-subjects experiments: a) an experiment involving an experimental group and a control group, and b) a factorial design with three independent variables that have three, and two levels respectively be exampled in more than one way and still be the correct answer?
In: Psychology
Lab 08: Finding Nemo
Youshouldturnin:1.A file named Lab08.m, and a screenshot of you running findingNemo() from thecommand line.
Instructions:1.On Canvas you will find a file named findingNemo.m and another named nemo.txt. Thefirst contains code which will read in strings from nemo.txt, then call Lab08(string) oneach line of nemo.txt. Your job is to write Lab08.m.
2.The Lab08 function will take in a string as input and will return an integer n as output.
3.The value of n will be the nth word in the input string, where n is the location of thesubstring 'Nemo'.a.Please note that you will need to match whole words only, so 'aNemone' and'Leonard Nemoy' should not be countedb.All strings will end with punctuation, so you do not need to work out the edgecase of a string like 'I found Nemo', which could cause significant problems
4.Once the value of n has been determined (hint: count the number of spaces before theindex at which you found Nemo), use the statement fprintf('I found Nemo at word%d!\n',n); to print the results.
5.If Nemo is not in the string, instead use the statement fprintf('I couldn''t find Nemo,sorry.\n'); and set n equal to negative one.
6.If Nemo is in the string multiple times, return the location of its first appearance.
7.Please be aware that if your file and function names are not the same as those expectedin findingNemo(), or if all three files are not in the same folder, your code will not workcorrectly.
function [] = findingNemo()
fileID = fopen('nemo.txt','r');
while true
line = fgets(fileID);
if line == -1
break;
end
n = Lab08(line);
fprintf('n = %d\n',n);
end
end
The author of this assignment swears she has never seen the movie Finding Nemo.No, for real, this is totally a joke about Captain Nemo from 20,000 Leagues Under the Sea.Okay, fine, I've never read 20,000 Leagues. But I did see Nadia: The Secret of Blue Water, which has a character named Captain Nemo.Or maybe it's NEMO: Never Eat More Oreos.I'll ask Leonard Nemoy. Or is it Nimoy?Wait, those don't match Nemo.At this point, Nemo doesn't even sound like a word anymore.I guess it's not, Nemo is a name.Buffalo buffalo buffalo buffalo. Nemo Nemo Nemo?Is it spelled Nemotode or Nemotoad? Oh well, let's study anemone instead.I'm thinking about making a cryptocurrency for Nebraska. What do you think of the name NEMoney?Nemo is also a town in South Dakota, evidently.Apparently NVIDIA has a toolkit for creating AI called NeMo, so that's weird.I'm running out of jokes about the name Nemo, to be honest.Let's just go watch Finding Nemo.
In: Computer Science
In: Psychology
Create a simple shopping cart application. Ask the user to input an item number and quantity. Update the shopping cart. Display the updated cart. Include the following when displaying cart: item number, name, quantity and total price. Ask for another update or end the program.
Design
Requires 2 classes: the main class and the cartItem class In the main class: Need one array named cartArray of type cartItem. Size = ? Need a loop that asks the user for input. Ask for item number, which is a string and quantity which is an integer. Need to create a new cartItem from user input of item number and quantity. Load the cartItem object into the cartArray. (CartItem is a class that takes two values in constructor: item number and item quantity.) Print out all items in cartArray (item number, name, quantity, and total price) and ask user for more input.
CartItem class
CartItem has four instance variables. String itemNumber; String name; int quantity; double totalPrice; It also has a “database” made up of 3 arrays. Described below. The CartItem class has a constructor that takes a String(itemNumber) and an integer(quantity) as arguments. The constructor does the following: It passes the item number up to the corresponding instance variable. It also passes the quantity up to the quantity instance variable. It then calls the getItemName method to first, get the item name and then set the item name instance variable. It calls the calcPrice method to set the totalPrice instance variable by first getting the total price and then setting the totalPrice instance variable.
The CartItem class Has at least the following methods: public double calcPrice(String itemNumber); Returns total price: calculated by multiplying price by quantity. Need to look up the price.Use the item number array to get the index of the item number. Use the item number index to find the price from the price array. Once you have the price you multiply the price by the quantity and return the total. public String getItemName(String itemNumber); returns item name. Use the item number array to get the index of the item number. Use this index to find the name of the corresponding item. Return the name. public void setItemName(String name); sets name instance variable. public String toString() returns the string values of all the variables. Array description The first is of type String that holds the item numbers. Example: {“101a”, “ 201b”, “301c”} The second array is of type String and it holds the item name. Example: {“Flashlight”, ”scissors”, “Book mark”}; Third array is of type double that has the corresponding prices: {12.99, 4.55, 1.99};
In: Computer Science
Create a simple shopping cart application. Ask the user to input an item number and quantity. Update the shopping cart. Display the updated cart. Include the following when displaying cart: item number, name, quantity and total price. Ask for another update or end the program. Design Requires 2 classes: the main class and the cartItem class In the main class: Need one array named cartArray of type cartItem. Size = ? Need a loop that asks the user for input. Ask for item number, a string and quantity, and integer. Need to create a new cartItem from user input of item number and quantity. Load the cartItem object into the cartArray. (CartItem is a class that takes two values in constructor: item number and item quantity.) Print out all items in cartArray (item number, name, quantity, and total price) and ask user for more input. CartItem class CartItem has four instance variables. String itemNumber; String name; int quantity; double totalPrice; It also has a “database” made up of 3 arrays. Described below. The CartItem class has a constructor that takes a String(itemNumber) and an integer(quantity) as arguments. The constructor does the following: It passes the item number up to the corresponding instance variable. It also passes the quantity up to the quantity instance variable. It then calls the getItemName method to first, get the item name and then set the item name instance variable. It calls the calcPrice method to set the totalPrice instance variable by first getting the total price and then setting the totalPrice instance variable. The CartItem class Has at least the following methods: public double calcPrice(String itemNumber); Returns total price: calculated by multiplying price by quantity. Need to look up the price.Use the item number array to get the index of the item number. Use the item number index to find the price from the price array. Once you have the price you multiply the price by the quantity and return the total. public String getItemName(String itemNumber); returns item name. Use the item number array to get the index of the item number. Use this index to find the name of the corresponding item. Return the name. public void setItemName(String name); sets name instance variable. public String toString() returns the string values of all the variables. Array description The first is of type String that holds the item numbers. Example: {“101a”, “ 201b”, “301c”} The second array is of type String and it holds the item name. Example: {“Flashlight”, ”scissors”, “Book mark”}; Third array is of type double that has the corresponding prices: {12.99, 4.55, 1.99};
ITP120 (java) is my subject.
In: Computer Science
Use Workbench/Command Line to create the commands that will run the following queries/problem scenarios.
Use MySQL and the Colonial Adventure Tours database to complete the following exercises.
1. List the last name of each guide that does not live in Massachusetts (MA).
2. List the trip name of each trip that has the type Biking.
3. List the trip name of each trip that has the season Summer.
4. List the trip name of each trip that has the type Hiking and that has a distance longer than 10 miles.
5. List the customer number, customer last name, and customer first name of each customer that lives in New Jersey (NJ), New York (NY) or Pennsylvania (PA). Use the IN operator in your command.
6. Repeat Exercise 5 and sort the records by state in descending order and then by customer last name in ascending order.
7. How many trips are in the states of Maine (ME) or Massachusetts (MA)?
8. How many trips originate in each state?
9. How many reservations include a trip price that is greater than $20 but less than $75?
10. How many trips of each type are there?
11. Colonial Adventure Tours calculates the total price of a trip by adding the trip price plus other fees and multiplying the result by the number of persons included in the reservation. List the reservation ID, trip ID, customer number, and total price for all reservations where the number of persons is greater than four. Use the column name TOTAL_PRICE for the calculated field.
12. Find the name of each trip containing the word “Pond.”
13. List the guide’s last name and guide’s first name for all guides that were hired before June 10, 2013.
14. What is the average distance and the average maximum group size for each type of trip?
15. Display the different seasons in which trips are offered. List each season only once.
16. List the reservation IDs for reservations that are for a paddling trip. (Hint: Use a subquery.)
17. What is the longest distance for a biking trip?
18. For each trip in the RESERVATION table that has more than one reservation, group by trip ID and sum the trip price. (Hint: Use the COUNT function and a HAVING clause.)
19. How many current reservations does Colonial Adventure Tours have and what is the total number of persons for all reservations?
In: Computer Science
C++ Programming.
Create a class hierarchy to be used in a university setting. The classes are as follows:
The base class isPerson. The class should have 3 data members: personID (integer), firstName(string), and lastName(string). The classshould also have a static data member called nextID which is used to assignanID numbertoeach object created(personID). All data members must be private.
Create the following member functions: Accessor functions to allow access to first name and last name (updates and retrieval). These functions should be public. Create a getID function to retrieve the personID of the person. This function should be public. The user oftheclassor any derived class should not have the ability to update personID. Create a constructor with two arguments(first name and last name) with default values.
Create a public member function Print to display information stored in the object. Make this class an abstract class. Create theStudent class as a derived class from the Person class. This class should have two additional data members to keep track of astudent’s GPA (float) and admission term (string –eg. Fall 2019). Create public accessor functions to allow access to the GPA and admission term. The setGPA function should return true if the value of the GPA is between 0 and 4.0(inclusive) and false otherwise. Set the GPA to zero if an invalid value is provided. Override the function Print to print the student information. Create a constructor that takes in four argumentswith default values(first name, last name, admission term, and GPA). Create the Faculty class as a derived class from the Person class. This class should have one additional data member to keep track of the yearthe faculty was hired(string –eg. 2019 ) Create a public accessor functionto allowaccess to the hire year. Override the function Print to print the faculty information. Create a constructor that takes in three argumentswith default values(first name, last name, hire year).
After defining the classes in this hierarchy, write a program that creates objects of each class and tests their member functions. Make sure you include the preprocessor directives (#ifndef, #define, #endif) to prevent a header file from being included (#include) multiple times. Separate the class interface from the class implementation.
Output Sample:
Faculty First Name: John
Faculty Last Name:Smith
Faculty ID:5
Faculty Hire Year:2019
******************************************************
******************************************************
Student First Name: Sarah
Student Last Name: Smith
Student ID: 3
Student GPA: 3.75
Student Admit Term: Fall 2019
In: Computer Science
You will be building a linked list. Make sure to keep track of both the head and tail nodes.
(1) Create three files to submit.
Build the PlaylistNode class per the following specifications. Note: Some functions can initially be function stubs (empty functions), to be completed in later steps.
Ex. of PrintPlaylistNode output:
Unique ID: S123 Song Name: Peg Artist Name: Steely Dan Song Length (in seconds): 237
(2) In main(), prompt the user for the title of the playlist. (1
pt)
Ex:
Enter playlist's title: JAMZ
(3) Implement the PrintMenu() function. PrintMenu() takes the
playlist title as a parameter and outputs a menu of options to
manipulate the playlist. Each option is represented by a single
character. Build and output the menu within the function.
If an invalid character is entered, continue to prompt for a
valid choice. Hint: Implement Quit before implementing other
options. Call PrintMenu() in the main() function. Continue to
execute the menu until the user enters q to Quit. (3 pts)
Ex:
JAMZ PLAYLIST MENU a - Add song d - Remove song c - Change position of song s - Output songs by specific artist t - Output total time of playlist (in seconds) o - Output full playlist q - Quit Choose an option:
(4) Implement "Output full playlist" menu option. If the list is
empty, output: Playlist is empty (3 pts)
Ex:
JAMZ - OUTPUT FULL PLAYLIST 1. Unique ID: SD123 Song Name: Peg Artist Name: Steely Dan Song Length (in seconds): 237 2. Unique ID: JJ234 Song Name: All For You Artist Name: Janet Jackson Song Length (in seconds): 391 3. Unique ID: J345 Song Name: Canned Heat Artist Name: Jamiroquai Song Length (in seconds): 330 4. Unique ID: JJ456 Song Name: Black Eagle Artist Name: Janet Jackson Song Length (in seconds): 197 5. Unique ID: SD567 Song Name: I Got The News Artist Name: Steely Dan Song Length (in seconds): 306
(5) Implement the "Add song" menu item. New additions are added to
the end of the list. (2 pts)
Ex:
ADD SONG Enter song's unique ID: SD123 Enter song's name: Peg Enter artist's name: Steely Dan Enter song's length (in seconds): 237
(6) Implement the "Remove song" function. Prompt the user for the
unique ID of the song to be removed.(4 pts)
Ex:
REMOVE SONG Enter song's unique ID: JJ234 "All For You" removed
(7) Implement the "Change position of song" menu option. Prompt the
user for the current position of the song and the desired new
position. Valid new positions are 1 - n (the number of
nodes). If the user enters a new position that is less than 1, move
the node to the position 1 (the head). If the user enters a new
position greater than n, move the node to position
n (the tail). 6 cases will be tested:
Ex:
CHANGE POSITION OF SONG Enter song's current position: 3 Enter new position for song: 2 "Canned Heat" moved to position 2
(8) Implement the "Output songs by specific artist" menu option.
Prompt the user for the artist's name, and output the node's
information, starting with the node's current position. (2
pt)
Ex:
OUTPUT SONGS BY SPECIFIC ARTIST Enter artist's name: Janet Jackson 2. Unique ID: JJ234 Song Name: All For You Artist Name: Janet Jackson Song Length (in seconds): 391 4. Unique ID: JJ456 Song Name: Black Eagle Artist Name: Janet Jackson Song Length (in seconds): 197
(9) Implement the "Output total time of playlist" menu option.
Output the sum of the time of the playlist's songs (in seconds). (2
pts)
Ex:
OUTPUT TOTAL TIME OF PLAYLIST (IN SECONDS) Total time: 1461 seconds
Main.cpp:
/* Type your code here */
__________________
PlaylistNode.cpp
/* Type your code here */
____________________-
PlaylistNode.H
/* Type your code here */
In: Computer Science