Questions
Add two lines of code in main() function to create a variable, goodStudent, whose type is...

Add two lines of code in main() function to create a variable, goodStudent, whose type is Student with name, "John" and age, 21.

public class Student {
   private String name;
   private int age;

   public Student(){
      name = "";
      age= 0;
   }

   public Student(String initName){
      name = initName;
      age = 0;
   }

   public String getName() {
      return name;
   }

   public void setAge(int anAge) {
       age = anAge;
   }

   public static void main (String[] args) {

        // !!!! Your two lines of code come here   !!!
    
   }
}

In: Computer Science

Review the project charter template and apply it to a project of your choice. Make suggestions for improving the template.

 

Review the project charter template and apply it to a project of your choice. Make suggestions for improving the template.

Please write your own project in charter template and make a suggestion how can the project charter templet can be improved for project managemnt.

Project Charter Templet
Background
[Why is the project being undertaken? Describe an opportunity or problem that the project is to address.]

Goals

[specific & measurable goal 1]

[specific & measurable goal 2]

[specific & measurable goal 3]

Scope
[What will be the end result of the project? Describe what phases of work will be undertaken. It’s also important to mention what activities will not be included in this project.]

Key Stakeholders

Client       

[name]

Sponsor

[name]

Project manager

[name]

Project team members

[name], [name], [name], [name].


Project Milestones
[Identify the significant project milestones: start date, end date and invoicing dates to the client.]

Project Budget
[Describe the main project expenses: non-recurring & monthly recurring.]

Constraints, Assumptions, Risks and Dependencies

Constraints     

[Describe here potential factors that will impact the delivery of the project]

Assumptions

[Describe here conditions or situations that you are relying on in order to achieve project goals]

Risks and Dependencies

[What are the most significant risks? What things must happen before the project is delivered?]

Approval Signatures

         

[Name], Project Client

 

[Name], Project Sponsor

 

[Name], Project Manager

In: Operations Management

Need to check if File is successfully opened? C++ It works when I input the right...

Need to check if File is successfully opened? C++

It works when I input the right txt file. But, it keeps stating, File successfully open." even I put in a non-existing file.

Here are the specifications:

Develop a functional flowchart and then write a C++ program to solve the following problem.

Create a text file named first.txt and write your first name in the file. You will be reading the name of the file from the keyboard as a string, using the string class. Your program will also read your first name from the keyboard. The process of the file creation (name of the file, mode for opening the file, and testing the open success is done in a user-defined function. The function communicates the status of file open to the calling function).

Here is what I have:

#include<string>

#include <iostream>

#include <fstream>

#include <cstdlib>

using namespace std;

int main() {

   string file; //This is a declaration for a file name

   string firstname;
   ofstream myfile;   

   cout << "Please enter the file name of your first name:";   
   cin >> file;   

   myfile.open(file);
  
   if (myfile.is_open())
   {
       cout << "\nFile successfully open.\n";
  
   }
   else
   {
       cout << "Error opening file";
   }

   cout << "Please enter your first name:"; //asks the user to input first name
   cin >> firstname; //user inputs first name

   myfile << firstname;
   myfile.close(); //closes the file

In: Computer Science

Why am I getting this error using 000webhost , but I do not get this error...

Why am I getting this error using 000webhost , but I do not get this error running XAMPP?

Warning: Cannot modify header information - headers already sent by (output started at /storage/ssd2/006/14881006/public_html/test/index.php:1) in /storage/ssd2/006/14881006/public_html/test/index.php on line 8
Code is below.

********************************************************************************************************************

<!DOCTYPE html>
<?php

   //Determine if the submit button has been clicked to set the cookie name and value
   if (isset($_POST['name'])){
           $cookie_name = $_POST['name'];
           $cookie_value = $_POST['value'];
           setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
   } else {
       $cookie_name = NULL;
       $cookie_value = NULL;      
   }
?>

<html>
   <body>
       <!-- Form to get cookie name and value -->
       <form action="index.php" method="post">
           <p>Cookie name: <input type="text" name="name" /></p>
           <p>Cookie value: <input type="text" name="value" /></p>
           <br>
           <p><input type="submit" name="Submit"/></p>
       </form>

       <?php

           //Display cookie name and value
           if(!isset($_COOKIE[$cookie_name])) {
           echo "Cookie named '" .$cookie_name. "' is not set!";
           } else {
           echo "Cookie '" .$cookie_name. "' is set!<br>";
           echo "Value is: " .$_COOKIE[$cookie_name];
           }
       ?>

       <p><strong>Note:</strong> You might have to reload the page to see the value of the cookie.</p>
   </body>
</html>

In: Computer Science

For this assignment you will create a set of simple classes that model a cookbook. The...

For this assignment you will create a set of simple classes that model a cookbook. The cookbook will consist of set or recipes. Each recipe will consist of a set of ingredients and instructions. Your submission will consist of the below three classes and a test driver (the only class with a main()) that exercises the functionality of your system.

You will need to implement the following classes based on the description of their attributes and operations:

  • Ingredient
    • name - the name of the ingredient
    • quantity - the amount of the ingredient
    • units - the unit of the quantity (e.g, tablespoon, or T, or Tbl)
    • require the creator to supply the name of the ingredient in order to create one
    • enable the user to retrieve and update each of the attributes appropriately
  • Recipe
    • name - the name of the recipe
    • category - the category of the recipe
    • ingredients - a list of ingredients (you may assume no more than 20)
    • instructions - this would be a paragraph of text, no need to worry about steps
    • require the creator to supply the name of the recipe in order to create one
    • enable the user to retrieve and update each of the attributes appropriately
  • Cookbook
    • name - the name of the cookbook
    • recipes - a list of recipes (you may assume no more than 20)
    • require the creator to supply the name of the cookbook in order to create one
    • enable the user to find recipes by name, returning only those recipes
    • Extra Credit (+1/3 letter grade): enable the user to find recipes by ingredient and return only those recipes

In: Computer Science

What discount rate is appropriate for finding the value ofArtforever.com? Write a few paragraphs giving...

What discount rate is appropriate for finding the value of Artforever.com? Write a few paragraphs giving your answer and clearly explaining your reasoning and computations; show detailed computations in your Excel spreadsheet labeled Exhibit 1.

Cost of Debt = 6.2%

After tax rate - CoD = 6.2%*(1-tax rate) = 6.2% * (1-40%) = 3.72%

Considering the Market return, Rm = 8%

Risk-free rate, Rf = 2.5% (30 yr Treasury bond YTM)

Considering industry beta = 1.5

Cost of equity = Rf + beta*(Rm - Rf) = 8% + 1.5*(8% - 2.5%) = 10.75%

Artforever's debt-to-value ratio = 15%.

Hence Equity value would be 85% of V as D+E=V.

WACC/Discounting rate to be used would be = (D/E)*CoD + (E/V)*CoE

= 9.6955% = 9.7%


In: Finance

a) Traveling waves propagate with a fixed speed usuallydenoted as v(but sometimes c). The waves are...

a) Traveling waves propagate with a fixed speed usuallydenoted as v(but sometimes c). The waves are called _______________ if their waveformrepeats every time interval T.
The fundamental relationship among frequency, wavelength, andvelocity is

v=fλ.

This relationship may be visualized as follows: In 1 s,  f·(1s) cycles of the wave move past an observer. In thissame second the wavetrain moves a distance  v·(1s)  .
c) If the velocity of the wave remains constant, then as thefrequency of the wave is increased, the wavelength___________.
d) The difference between the frequency f and the frequency w is that f is measured in cycles per second or hertz (abbreviated Hz) whereasthe units for w are _______ per second.
e) Find an expression for the period of a wave T in terms of other kinematic variables.
f) What is the relationship between w and f?
g) What is the simplest relationship between the angularwavenumber k and just one of the other kinematic variables?

In: Physics

When you cough, your windpipe contracts. The speed, v(r), with which you expel air through your...

When you cough, your windpipe contracts. The speed, v(r), with which you expel air through your windpipe, depends in the radius, r, of your windpipe. If a is normal (rest) radius of your windpipe, then for 0<r<a. The speed is given by: v(r)=k(a-r)r^2 where k is a positive constant. For an individual, assume a to be constant. a. Find all critical points of v(r). b. what value of r minimizes the speed? Explain briefly using the second derivative test. c. What value of r maximizes the speed, and what is this maximum speed? explain briefly using the first derivative test. d. Consider two individuals, Jay and Dee. Jay's value of a is larger than Dee's value of a. How would Jay's maximum windpipe velocity compare to that of Dee? Explain briefly.

In: Math

Jack is riding his bicycle from home to LeConte College with a velocity given by v(t)=...

Jack is riding his bicycle from home to LeConte College with a velocity given by v(t)= -t^4 + 4-t^3 - 500t^2 +2000t in feet away from his house per minute and where t is in minutes. If it takes jack 20 minutes to get to LeConte College, find the following:

a.) Estimation of S (integral) upper 20, lower 0: v(t)dt using left-hand sums with n=2 subdivisions. Why is this a bad estimate?

b.)Estimation of S (integral) upper 20, lower 0, v(t)dt using right hand sums with n=5 subdivisions. What does this number represent an estimate of?

c.) Find the exact distance Jack traveled by integration (assume jack is 0 feet from his house at time = 0)(include units).

In: Math

(8pts) A hot air balloon moves up at constant speed v = 20.0 m/s. When the...

(8pts) A hot air balloon moves up at constant speed v = 20.0 m/s. When the balloon is 20.0 meter above the ground, a cup of lemonade falls out of the balloon. And the balloon continues to move up at a constant speed v = 20.0 m/s. Ignore the air resistance.(a)Describe the motion of the lemonade cup as relative to the ground.(b)Describe the motion of the lemonade cup as relative to the balloon. (c)On the same diagram,plot thev-t graph of the balloon and the v-t diagram of the lemonade cup as relative to the ground. Choose upward as the positive direction, and t=0 when the cup starts to fall out of the balloon.(d)How long does it take for the cup to fall tothe ground?(bonus 1pt) What is the distance between the cup and balloon 1 seconds after the cupis dropped?

In: Physics