The cost of a can of Coca Cola in 1960 was $ 0.10 . The exponential function that models the cost of a Coca Cola by year is given below, where t is the number of years since 1960 . C ( t ) = 0.10 e^0.0576t Find the expected cost of a can of Coca Cola in 1990 , 2000 , 2015 and 2040 (rounded to the nearest cent). They expected the cost of Coca Cola to be $-------- in 1990 , $ --------in 2000 , $-------- in 2015 , and $ -------in 2040 .
In: Math
A country's census lists the population of the country as 246 million in 1990, 268 million in 2000, and 286 million in 2010. Fit a second-degree polynomial passing through these three points. (Let the year 2000 be x = 0 and let p(x) represent the population in millions.) p(x) = million
Use this polynomial to predict the population in 2020 and in 2030.
2020 million
2030 million
In: Advanced Math
Analyze the yearend adjustments; update the T-accounts and the final trail balance.
Part 2 December Adjustments:
1. Ahern purchased a building for $3,500,000. They purchased it using a mortgage for the full amount. There other properties were fully depreciated. The building had a residual value of $500,000 and an expected life of 75 years. Record the building purchase and this year’s depreciation.
2. The equipment has a residual value of $17,710 and a useful life of 20 years. Record the depreciation for this year.
3. Calculate the interest due for the $600,000 note at % on December 1. Record the year-end interest.
4. The current portion of the new mortgage due is $350,000. Please make the appropriate entries.
5. During the last pay period of the year, a payroll of 5 days was earned with 5 days left in the New Year. 5 workers made $25 an hour for 8 hrs a day. 2 workers worked 4 extra hours on 3 days at time and a half record the entries for December.
6. $100 of unearned revenue was earned by year-end.
7. An insurance policy was purchased on September 1, 2017. For one year in the amount of $6000. Record the entry for December’s expired insurance. It is paid monthly.
8. The ending balance of supplies was $8000.
9. Income tax was calculated at 20%.
In: Accounting
Update: I provided an answer of my own (reflecting the things I discovered since I asked the question). But there is still lot to be added. I'd love to hear about other people's opinions on the solutions and relations among them. In particular short, intuitive descriptions of the methods used. Come on, the bounty awaits ;-)
Now, this might look like a question into the history of Ising model but actually it's about physics. In particular I want to learn about all the approaches to Ising model that have in some way or other relation to Onsager's solution.
Also, I am asking three questions at once but they are all very related so I thought it's better to put them under one umbrella. If you think it would be better to split please let me know.
When reading articles and listening to lectures one often encounters so called Onsager's solution. This is obviously very famous, a first case of a complete solution of a microscopic system that exhibits phase transition. So it is pretty surprising that each time I hear about it, the derivation is (at least ostensibly) completely different.
To be more precise and give some examples:
The most common approach seems to be through computation of
eigenvalues of some transfer matrix.
There are few approaches through Peierl's contour model. This can
then be reformulated in terms of a model of cycles on edges and
then one can either proceed by cluster expansion or again by some
matrix calculations.
The solutions differ in what type of matrix they use and also whether or not they employ Fourier transform.
Now, my questions (or rather requests) are:
Try to give another example of an approach that might be called
Onsager's solution (you can also include variations of the ones I
already mentioned).
Are all of these approaches really that different? Argue why or why
not some (or better yet, all) of them could happen to be
equivalent.
What approach did Onsager actually take in his original paper. In
other words, which of the numerous Onsager's solutions is actually
the Onsager's solution.
For 3.: I looked at the paper for a bit and I am a little perplexed. On the one hand it looks like it might be related to transfer matrix but on the other hand it talks about quaternion algebras. Now that might be just a quirk of Onsager's approach to 4x4 matrices that pop basically in every other solution but I'll need some time to understand it; so any help is appreciated.
In: Physics
Web Application Development Course - C#
Update the ASP.NET web application code by adding below functionality:
• Create a new web form called Welcome.aspx and add labels to show name, company, email, and membership.
• Create a new business layer class called Customer to hold the entered user details
• When the user clicks on Sign Up button and if all the validations on the page pass
o Store the details entered on page in the Customer object.
o Save the Customer object in Session State.
o Navigate to Welcome.aspx, read the Customer object from Session State and show the name, company, email and membership on this page using respective labels.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace PopQuiz4
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;
if (!IsPostBack)
{
radBtnFree.Checked = true;
ddlTimeZone.SelectedIndex = 0;
}
}
protected void radBtnFree_CheckedChanged(object sender,
EventArgs e)
{
if (radBtnFree.Checked)
{
lblAmount.Text = "$0";
}
}
protected void radBtnBasic_CheckedChanged(object sender,
EventArgs e)
{
if (radBtnBasic.Checked)
{
lblAmount.Text = "$30";
}
}
protected void radBtnPremium_CheckedChanged(object sender,
EventArgs e)
{
if (radBtnPremium.Checked)
{
lblAmount.Text = "$60";
}
}
protected void CustValTxtEmail_ServerValidate(object source,
ServerValidateEventArgs args)
{
if (txtEmail.Text.Contains(txtCompany.Text))
{
args.IsValid = true;
}
else
{
args.IsValid = false;
}
}
protected void btnSignup_Click(object sender, EventArgs e)
{
if (IsValid)
{
lblStatus.Text = "Sign up successful!";
lblStatus.ForeColor = System.Drawing.Color.Green;
}
}
}
}
In: Computer Science
Update: Total cost is provided see below. We have to calculate Marginal Revenue numbers and others.
Please advise,
The chart below shows the demand curve for dog food at Charlie’s dog food factory and the total cost of producing various quantities:
| Quantity | Price ($\lb) | Total Revenue | Marginal Revenue ($) | Total Cost | Marginal Cost | Profit |
| 1 | 15 | 3 | ||||
| 2 | 13 | 8 | ||||
| 3 | 11 | 15 | ||||
| 4 | 9 | 24 | ||||
| 5 | 7 | 35 | ||||
| 6 | 5 | 48 |
Fill in the rest of the chart.
b. How much dog food should Charlie sell, and what price should he charge? Answer first using Method I and then using Method II.
c. If Charlie is required to pay a $5 annual license fee to operate his dog food factory, what happens to his total cost numbers? What happens to his marginal cost numbers? What happens to the amount of dog food he sells and the price he charges?
d. If Charlie is required to pay an excise tax of $6 per pound of dog food, what happens to his total cost numbers? What happens to his marginal cost numbers? What happens to the amount of dog food he sells and the price he charges?
In: Economics
Update your program from Homework 4, number 2 (Hat, Jacket, and Waist size) to allow the user to repeat the calculation as many times as they wish. Include error handling - the program should throw an error if the user enters invalid input (ie. a negative height). The program must use try, throw and catch and must use the runtime_error kind of how I used it but it still has to be debugged.
#include <iostream>
#include <exception>
using namespace std;
double hat(double,double);
double jacket(double,double,int);
double waist(double,double,int);
int main ()
{
double height = 0.0, weight = 0.0;
int age = 0;
char answer;
do
{
try{
if (height <= 0){
throw runtime_error ("Error: Invalid input of height ");
}
cout << "Enter your height in inches: ";
cin >> height;
}catch (const runtime_error& e){
cerr << e.what ();
}
try{
if (weight <= 0){
throw runtime_error ("Error: Invalid input of pounds ");
}
cout << "Enter your weight in pounds: ";
cin >> weight;
}catch (const runtime_error& e){
cerr << e.what ();
}
try{
if (age <= 0){
throw runtime_error ("Error: Invalid input of age ");
}
cout << "Enter your age: ";
cin >> age;
}catch (const runtime_error& e){
cerr << e.what ();
}
cout << "\nYour Hat size is: " << hat(weight ,height);
cout << "\nYour Jacket size is: "<< jacket( height, weight, age);
cout << "\nYour Waist size is: "<< waist( height, weight, age);
cout << "\nWould you like to continue (y/n)? ";
cin>>answer;
}
while((answer) == 'y');
return 0;
}
double hat(double weight ,double height)
{
return ((weight/height) * 2.9);
}
double jacket(double height,double weight,int age)
{
double size;
int j;
if (age>=30)
{
if((age % 10) !=0)
age = age-(age%10);
j= (age-30)/10;
size =((height * weight) / 288)+((1.0/8)*j);
}
else
size =((height * weight) / 288);
return size;
}
double waist(double height,double weight,int age)
{
double size2;
int w;
if(age >= 28)
{
if((age % 2) !=0)
age = age-(age%2);
w = (age-28)/2;
size2 = (weight/(5.7))+( (1.0/10)*w);
}
else
size2 = weight / (5.7);
return size2;
}
In: Computer Science
Your company needs to update stakeholders(customers, suppliers, government/MPs, partners, and the community) about the impact of COVD-19 on its services. What communication strategies would you use to share information with these stakeholders, and reasons for choosing such, considering their merits and demerits. Choose any five (5) stakeholders and show how you would communicate with them. [40]
In: Operations Management
zyDE 9.16.1: Dice game Craps.
// Simulates a dice game called Craps
import java.util.Random;
import java.text.DecimalFormat;
import java.util.Scanner;
public class Craps {
// Game statistics
private int diceTotal;
private int credits;
private int numTurns;
private int numWins;
private int highCredits;
private int startCredits;
// Random number generator to simulate dice
private Random diceThrower;
// Constructor initializes instance members
public Craps() {
diceTotal = 0;
diceThrower = new Random();
}
// Return current credits
public int getCredits() {
return credits;
}
// Set number of credits and check for
// negative values
public void setCredits(int amount) {
credits = 0;
if (amount > 0) {
credits = amount;
}
}
// Generates two random numbers (1 - 6)
// to simulate two dice
private void rollDice() {
int d1 = diceThrower.nextInt(6) + 1;
int d2 = diceThrower.nextInt(6) + 1;
diceTotal = d1 + d2;
}
// Update statistics when player wins
private void playerWins() {
++credits;
++numWins;
// FIX ME: update highCredits if new high is achieved
highCredits = credits;
}
// Print game statistics
private void printStatistics() {
DecimalFormat fmt = new DecimalFormat("#,###.#");
double percentWins = ((double) numWins / numTurns) * 100.0;
System.out.println("\n\nGame Results");
System.out.println("Start Credits: " +
fmt.format(startCredits));
System.out.println("Turns: " + fmt.format(numTurns));
System.out.println("Wins: " + fmt.format(numWins)
+ " (" + fmt.format(percentWins) + "%)");
System.out.println("High Credits: " +
fmt.format(highCredits));
}
// Set game statistics to starting conditions
private void resetStatistics() {
numTurns = 0;
numWins = 0;
highCredits = 0;
startCredits = credits;
}
// Simulates one player turn
// Returns true if player wins and false if player loses
public boolean takeOneTurn() {
boolean playerWon;
// Player takes initial roll
rollDice();
// FIX ME: Increment numTurns
// Player wins with 7 or 11
if (diceTotal == 7 || diceTotal == 11) {
playerWon = true;
playerWins();
}
// Player loses with 2, 3 or 12
else if (diceTotal <= 3 || diceTotal == 12) {
playerWon = false;
--credits;
}
// Player keeps rolling until 7 or the point
else {
int point = diceTotal;
do {
rollDice();
} while (diceTotal != point && diceTotal != 7);
// Player wins with the point
if (diceTotal == point) {
playerWon = true;
playerWins();
}
// Player loses with 7
else {
playerWon = false;
--credits;
}
}
return playerWon;
}
// Play a specified number of turns and track
// the percentage of player wins
public void takeMultipleTurns(int numTurns) {
setCredits(10);
resetStatistics();
for (int i = 0; i < numTurns; ++i) {
takeOneTurn();
}
}
// Play until credits = 0 given a starting amount
public void playUntilBroke(int startingCredits) {
setCredits(startingCredits);
resetStatistics();
while (credits > 0) {
takeOneTurn();
}
}
// main() method uses an object of type Craps
public static void main(String [] args) {
Scanner scnr = new Scanner(System.in);
Craps crapsGame = new Craps();
int startCredits = 10;
// Continue as long as player chooses to
do {
crapsGame.playUntilBroke(startCredits);
crapsGame.printStatistics();
System.out.print("Enter starting credits (0 to quit): ");
startCredits = scnr.nextInt();
} while (startCredits > 0);
System.out.println("\nGood bye...");
}
}
In: Computer Science
UPDATE: Whole Code
How do I fix this Bold part "!= Null" ? its showing me Error? please Help
#include<iostream>
#include<string>
#include<string.h>
#include<fstream>
#include<stdlib.h>
#include<sstream>
using namespace std;
int main(){
string list[1000];
cout << "! Opening data file... ./Data.CS.SFSU.txt\n";
ifstream fin("Data.CS.SFSU.txt");
if(fin.fail()){
cout << "Error opening file\n";
return 0;
}
cout << "! Loading data...\n";
int count = 0;
while(getline(fin,list[count])!=NULL){
//cout << "--------------------\n";
count++;
}
cout << "! Loading completed...\n";
fin.close();
cout << "! Closing data file... ./Data.CS.SFSU1.txt\n";
cout << "-----DICTIONARY 340 C++-----\n";
while(true){
cout << "Search:";
string line;
getline(cin,line);
cout << "|" << endl;
stringstream ss(line);
string word1, word2, word3;
ss >> word1 >> word2;
if (ss >> word3 || (word2 != "noun" && word2 !=
"adjective" && word2 != "verb")){
cout << "Please enter a search key (and a part of
speech)\n";
}
else {
for (int i = 0; i<word1.length(); i++){
word1[i] = tolower(word1[i]);
}
int found = 0;
cout << count << endl;
for (int i = 0; i< count; i++){
char line2[200];
strcpy(line2, list[i].c_str());
char *ch = strtok(line2,"|");
//cout << ch << endl;
while (ch != NULL){
//cout << ch << endl;
//cout << ch1 << " " << endl;
if (strcmp(ch,(char *)word1.c_str()) == 0){
ch = strtok(NULL,"|");
char line[100];
strcpy(line, ch);
char *ch1 = strtok(line," ");
//cout << line << endl;
if (strcmp(ch1,word2.c_str()) == 0){
ch1 = strtok(NULL," ");
ch1 = strtok(NULL," ");
string s ="";
while (ch1 != NULL){
s = s + ch1 + " ";
ch1 = strtok(NULL," ");
}
cout << word1 << "[" << word2 << "] :"
<< s << endl;
found = 1;
break;
}
}
ch = strtok(NULL,"|");
}
if (found == 1)
break;
}
if (found == 0)
cout << "Not found\n";
}
cout << "|" << endl;
}
return 0;
}
In: Computer Science