Create a program named PaintingDemo that instantiates an array of eight Room objects and demonstrates the Room methods. The Room constructor requires parameters for length, width, and height fields (all of type int); use a variety of values when constructing the objects. The Room class also contains the following fields: Area - The wall area of the Room (as an int) Gallons - The number of gallons of paint needed to paint the room (as an int)

Answers

Answer 1

Answer:

Explanation:

Code used will be like

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

namespace PaintingWall

{

class Room

{

public int length, width, height,Area,Gallons;

public Room(int l,int w,int h)

{

length = l;

width = w;

height = h;  

}

private int getLength()

{

return length;

}

private int getWidth()

{

return width;

}

private int getHeight()

{

return height;

}

public void WallAreaAndNumberGallons()

{

Area = getLength() * getHeight() * getWidth();

if (Area < 350)

{

Gallons = 1;

}

else if (Area > 350)

{

Gallons = 2;

}    

Console.WriteLine ("The area of the Room is " + Area);

Console.WriteLine("The number of gallons paint needed to paint the Room is " + Gallons);

}

 

}

class PaintingDemo

{

static void Main(string[] args)

{

int l, w, h;

Room[] r = new Room[8];

for (int i = 0; i <= 7; i++)

{

Console.WriteLine("Room "+(i+1));

Console.Write("Enter Length : ");

l = Convert.ToInt32(Console.ReadLine() );

Console.Write("Enter Width : ");

w = Convert.ToInt32(Console.ReadLine());

Console.Write("Enter Height : ");

h= Convert.ToInt32(Console.ReadLine());

r[i] = new Room(l,w,h);

Console.WriteLine();

}

for (int i = 0; i <= 7; i++)

{

Console.WriteLine("Room " + (i + 1));

r[i].WallAreaAndNumberGallons();

}

Console.ReadKey();  

}

}

}


Related Questions

Suppose that the cost of electrical energy is $0.15 per kilowatt hour and that your electrical bill for 30 days is $80. Assume that the power delivered is constant over the entire 30 days. What is the power in watts? If a voltage of 120 V supplies this power, what current flows? Part of your electrical load is a 60-W light that is on continuously. By what percentage can your energy consumption be reduced by turning this light off?

Answers

Answer:

a) 740 W b) 6.2 A c) 8.1%

Explanation:

We need first to get the total energy spent during the 30 days, that can be calculated as follows:

1 month = 30 days = 720 hr

If the total cost amounts $80 (for 720 hr), and the cost per kwh is 0.15, we have:

80 $/mo  =  0.15 $/Kwh*x Kwh/mo

Solving for the total energy spent in the month:

[tex]x (kwh/mo) = \frac{80}{0.15} = 533.3 kwh[/tex]

Assuming that the power delivered is constant over the entire 30 days, as power is the rate of change of energy, we can find the power as follows:

[tex]P = \frac{E}{t} = \frac{533.3 kWh}{720 h} = 0.74 kW = 740 W[/tex]

b) If the power is supplied by a voltage of 120 V, we can find the current I as follows:

[tex]I =\frac{P}{V} =\frac{740W}{120V} = 6.2A[/tex]

c) If part of the electrical load is a 60-W light, we can substract this power from the one we have just found, as follows:

P = 740 W - 60 W = 680 W

The new value of the energy spent during the entire month will be as follows:

E = 0.68 kW*24(hr/day)*30(days/mo) = 490 kWh/mo

The reduction in percentage regarding the total energy spent can be calculated as follows:

ΔE = [tex]\frac{533.3-490}{533.3} = 0.081*100= 8.1%[/tex]

ΔE(%) = 8.1%

[tex]%(E) =\frac{533.3-490}{533.3} = 0.081 * 100 = 8.1%[/tex]

A 6-pack of canned drinks is to be cooled from 23°C to 3°C. The mass of each canned drink is 0.355 kg. The drinks can be treated as water, and the energy stored in the aluminum can itself is negligible. The amount of heat transfer from the six canned drinks is _____ kJ.

Answers

Answer:

178 kJ

Explanation:

Assuming no heat transfer out of the cooling device, and if we can neglect the energy stored in the aluminum can, the energy transferred by the canned drinks, would be equal to the change in the internal energy of the canned drinks, as follows:

ΔU = -Q = -c*m*ΔT (1)

where c= specific heat of water = 4180 J/kg*ºC

           m= total mass = 6*0.355 Kg = 2.13 kg

           ΔT = difference between final and initial temperatures = 20ºC

Replacing by these values in (1), we can solve for Q as follows:

Q = 4180 J/kg*ºC * 2.13 kg * -20 ºC = -178 kJ

So, the amount of heat transfer from the six canned drinks is 178 kJ.

Answer:

-178.92 kJ

Explanation:

The amount or quantity (Q) of heat transferred during a chemical process such as cooling is the product of the mass (m) of the substance involved, the specific heat capacity (c) of the substance and the change in temperature (ΔT) of the substance. i.e

Q = m x c x Δ T   ----------------------(i)

From the question;

m = total mass of the canned drinks = 6 x 0.355kg = 2.13kg

ΔT = final temperature - initial temperature = 3°C - 23°C = -20°C

Known constant;

c = specific heat capacity of water = 4200J/kg°C

Substitute all these values into equation (i) as follows;

Q = 2.13 x 4200 x (-20)

Q = -178920 J

Divide the result by 1000 to convert it to kJ as follows;

Q = (-178920 / 1000) kJ

Q = -178.92 kJ

Therefore, the quantity of heat transferred from the six canned drinks is -178.92 kJ

Note;

The -ve sign shows that the heat transferred is actually the heat lost in cooling the drinks from 23°C to 3°C

For the following functions, determine if the functions are periodic. If so, find the shortest period. A. x(t) = (t2-1)cos(t) B. x(t)-cos(nt) +5 sin(5πt) C. x[n] = sin[n] + cos[n] D. x(t) cos(3t) + sin(Tt) E. x[n] = cos(m) + 1 F. x(t)-(sin nt)(cos πt) | 2

Answers

Answer:

A Not Periodic

B Periodic

C Periodic

D Not Periodic

E Periodic

F Periodic

Explanation:

The detailed steps to ascertain the periodicity or the non periodicity of each functions is as shown in the attached file.

You buy a 75-W lightbulb in Europe, where electricity is delivered to homes at 240V. If you use the lightbulb in the United States at 120 V (assume its resistance does not change), how bright will it be relative to 75-W 129-V bulbs?

Answers

Answer:

The bulb will be [tex]\frac{1}{4}[/tex] times as bright as it is in Europe.

Explanation:

Data provided in the question:

Power of bulb in Europe = 75 W

Voltage provided in Europe = 240 V

Voltage provided in United Stated = 120 V

Now,

We know,

Power = Voltage² ÷ Resistance

Therefore,

75 = 240² ÷ Resistance

or

Resistance = 240² ÷ 75

or

Resistance = 768 Ω

Therefore,

Power in United States = Voltage² ÷ Resistance

= 120² ÷ 768

= 18.75 W

Therefore,

Ratio of powers

[tex]\frac{\text{Power in united states}}{\text{Power in Europe}}=\frac{18.75}{75}[/tex]

= [tex]\frac{1}{4}[/tex]

Hence,

The bulb will be [tex]\frac{1}{4}[/tex] times as bright as it is in Europe.

A team member who has been a good worker for many years has recently been doing poor work. You suspect that he may be tired of his job. Further, you know he is particularly sensitive to negative feedback. What is your best course of action?

Answers

Answer:

You must follow the steps below to deal with employees who have poor performance. I hope that you will be able to handle all the issues after reading this answer.

Explanation:

Be specific with facts in hand

It is important to confront your employees about their respective actions. But to convince them about their withdrawal from lack of interest, it is imperative to have a consistent record at hand as well. For example, if the employee has been constantly delayed for a period of time, specify the precise details about the frequency and intensity of absenteeism. Be sure not to overdo your statements or use hard phrases to reduce employee self-esteem. Just be direct and precise. Reiterate the guidelines accordingly.

Consider the needs of your employees

Poor performance is not always the result of an employee's carelessness. There can be multiple genuine reasons for lack of performance and it can vary from person to person. The first is to understand the reason and judge whether they are genuine or not. Even if they aren't, don't let the other person know. Focus on your concerns and provide solutions accordingly. For example, if your employees cannot focus on their work due to some personal stress, make appointments for the counseling sessions and make sure they can get back on track.

Focus on feedback

Everyone handles comments differently. Although it is always recommended to be direct and clear in your communication, there may be certain strategies you can adopt to communicate your comments effectively. If your employee has difficulties in achieving his goals, work with him and provide him with all the necessary help to improve his performance. The best way is to provide weekly or monthly comments to your employees, so they know what they must do to achieve their goals.

Provide Performance Support Technology

When faced with existing employees who do not meet expectations, it is a smart decision to offer them training (and / or training) and different resources to help them improve. As an example, you can combine a low-performance worker with someone to act as a mentor or offer you a manual with the procedures to follow. In addition, there are performance improvement tools: WalkMe is a very valuable technology that can help a worker be more efficient and precise, within the workflow (and not take them away from their daily tasks).

Offer rewards and recognition

Whenever you see that your employees have poor performance, it is always better to adopt a carrot and stick approach for instant and consistent improvement. It is a combination of rewards and punishments that you can induce for the best and worst weekly or monthly performance. This has proven to be one of the best ways to combat low performance problems in companies of all kinds for centuries.

Facing low-performance workers for the first time may not be too encouraging for managers as well, but having an adequate system to deal with them is essential, especially during the performance of change management. It is always better to deal with such situations, instead of ignoring them, to maintain the consistency of productivity and profitability in the business.

Python Codio Question:

This is a tricky challenge for you.

We will pass in a value N. N can be positive or negative.

If N is positive then output all values from N down to and excluding 0.

If N is negative, then output every value from N up to and excluding 0.


# Get N from the command line
import sys
N = int(sys.argv[1])

# Your code goes here

Answers

Answer:

# -*- coding: utf-8 -*-

# Get N from the command line

import sys

N = int(sys.argv[1])

if N > 0: #N is positive  

   positve = list(range(N,0,-1))

   print(positve)

elif N < 0: #N is negative  

   negative = list(range(N,0,1))

   print(negative)

else:

   print("Invalid in input")

Explanation:

First, you need to identify if the number entered is positive, negative or none of them, for that we use one if, one elif and one else statement:

If the number entered (N) is greater than zero (is positive) we print a list in the range N to 0 in steps of minus one, the zero is not printed because the function range by default omits the last valueIf the previous statement was False and the number entered is smaller than zero (is negative) we print a list in the range N to 0 in steps of one, the zero is not printed because the function range by default omits the last valueFinally, if the two previous events were false print invalid input

2. Volcanic islands that form over mantle plumes, such as the Hawaiian chain, are home to some of Earth’s largest volcanoes. However, several volcanoes on Mars are gigantic compared to any on Earth. What does this difference tell us about the role of plate motion in shaping the Martian surface?

Answers

The theory that explains this phenomenon is linked to the convergence of tectonic plates when there is immersion over the crazy oceanic ones. This movement could be referred to as an oceanic-oceanic convergence where the immersion of two ocean slabs occurs and one descends below another plate and initiates volcanic activity by the same mechanism that operates in all subduction zones.

In this way the movement of the plate on the Martian surface could be relatively much faster than the occurrence of the movement of the plate on Earth. Giant volcanoes form because the area of ​​the most oceanic crust converges faster.

If the wire has a diameter of 0.6 in., determine how much it stretches when a distributed load of w=100lb/ft acts on the beam. The wire remains elastic. Use Est=29.0(103)ksi.

Answers

Final answer:

To determine how much a wire stretches under a load, one must consider Hooke's Law and use Young's modulus, but the original length of the wire and the type of load distribution must be known.

Explanation:

The student's question relates to the concept of elasticity and specifically the calculation of how much a wire stretches under a given load within the elastic limit.

Using the provided diameter of the wire, which is 0.6 inches, and the fact that an elastic modulus (Est) of 29.0(103) ksi has been given, the stretch can be calculated using Hooke's Law, which relates stress and strain through Young's modulus. However, to calculate the stretch, we would require the initial length of the wire and the format of the distributed load (whether it's uniform or varies along the length of the wire) which have not been provided in the student’s query.

Assuming uniform distributed load and an initial length L, the stretch (delta L) can be found using  delta L =  rac{wL^2}{AE}, where w is the load per unit length, L is the initial length, A is the cross-sectional area, and E is Young's modulus. If the total weight of the load is given instead, then the formula  delta L =  rac{FL}{AE} can be used with F representing the total force or weight affecting the wire.

Another common unit for viscosity is the centipoise, which is 10-2 poise (just like a centimeter is 10-2 meters). (1 centipoise = 0.001 N⋅s/m2) The unit poise is named after Jean Leonard Marie Poiseuille. The conversion between the centipoise and the Pa⋅s is 1 centipoise = 1 mPa.s. What is the viscosity of water at room temperature?

Answers

Answer and Explanation

Picking room temperature to be 20°C, the viscosity of water (μ) obtained from literature is:

1 centipoise = 0.01 poise = 0.001 Pa.s = 0.001 N.s/m² (This viscosity is the dynamic viscosity of water at 20°C)

Kinematic viscosity of water, η = μ/ρ

At 20°C, μ = 0.001 Pa.s, ρ = 998.23 kg/m³

η = 0.001/998.23 = 1.0 × 10⁻⁶ m²/s

Picking the room temperature to be 25°C, the viscosityof water (μ) is

0.89 centipoise = 0.0089 poise = 0.00089 Pa.s = 8.9 × 10⁻⁴ N.s/m²

Kinematic viscosity of water, η = μ/ρ

At 25°C, μ = 0.00089 Pa.s, ρ = 997 kg/m³

η = 0.00089/997 = 8.9 × 10⁻⁷ m²/s

The viscosity of water at room temperature in

We want to find the viscosity of water at room temperature in N.s/m² and mPa.s is;

0.001 N.s/m² and 1 mPa.s

Room temperature is 20°C.

Now, from online research, the viscosity of water at room temperature is 0.01 poise

We are told that;

1 centipoise = 0.01 poise

Also, that;

1 centipoise = 0.001 N⋅s/m²

Thus; viscosity of water at room temperature in N. s/m² is; 0.001 N.s/m²

Also, also 1 centipoise = 1 mPa.s

Thus;

Viscosity of water at room temperature in mPa.s is; 1 mPa.s

Read more about viscosity at; https://brainly.com/question/2568610

A water tank filled with water to a depth of 16 ft has in inspection cover (1 in. 3 1 in.) at its base, held in place by a plastic bracket. The bracket can hold a load of 9 lbf. Is the bracket strong enough? If it is, what would the water depth have to be to cause the bracket to break?

Answers

Answer:

[tex]F=6.88 [lbf][/tex]

The bracket is strong enough.

[tex]h=20.91 [ft][/tex]

Explanation:

Let's recall that the variation of the pressure respect to displacement in a liquid incomprehensible and static will be:

[tex]\frac{dP}{dy}=-\rho g[/tex]

If we take ρ (density) as a constant and solving this differential equation, we will have:

[tex]\Delta P=\rho gh[/tex]                            

P is the total pressureh is the height

Now, the pressure at the base will be:

[tex]P_{base}=\rho gh[/tex]

We use this equation knowing that we have atmospheric pressure on the outside of the tank.

The force on the inspection cover will be (A=1 in²):

[tex]F=P_{base}A=\rho ghA= 62.4 [lb/ft^{3}]*32.2 [ft/s^{2}]*16 [ft]*0.00689 [ft^{2}]=221.47 [\frac{lb*ft}{s^{2}}][/tex]

We know that 1 lbf = 32.17 (lb*ft)/s², so:

[tex]F=6.88 [lbf][/tex]

The statement says that the bracket can hold a load of 9 lbf, therefore the bracket is strong enough.

We can use the equation of the force to find the depth.

[tex]F=\rho ghA[/tex]

If we solve it for h we will have:

[tex]h=\frac{F}{\rho gA}[/tex]

F is the force that bracket can hold (9 lbf or 289.53 (lb*ft)/s²)A is the area (A=0.00689 ft²)

[tex]h=\frac{289.53}{62.4*32.2*0.00689}=20.91 [ft][/tex]

I hope it helps you!

The manufacturer of a 1.5 V D flashlight battery says that the battery will deliver 9 {\rm mA} for 37 continuous hours. During that time the voltage will drop from 1.5 {\rm V} to 1.0 {\rm V} . Assume the drop in voltage is linear with time.Part A How much energy does the battery deliver in this 37h interval?Express your answer to two significant figures and include the appropriate units.

Answers

Answer:

1.42 KJ

Explanation:

solution:

power in beginning [tex]p_{0}[/tex]=(1.5 V).(9×[tex]10^{-3}[/tex] A)

                                    = 13.5 mW

after continuous 37 hours it drops to

                                    [tex]p_{37}[/tex]=(1 V).(9×[tex]10^{-3}[/tex] A)

                                         =9 mW

When the voltage will drop energy will not remain the same but the voltage drop will always remain same if the voltage was drop to for example from 5 V to 4.5 V the drop will remain the same.

                  37 hours= 37.60.60

                                 =133200‬ s

                              w=(9×[tex]10^{-3}[/tex] A×133200‬ )+[tex]\frac{1}{2}(13.5.10^{-3}-9.10^{-3})(133200)[/tex]

                                 =1.42 KJ

NOTE:

There maybe a calculation error but the method is correct.

A water pump increases the water pressure from 15 psia to 70 psia. Determine the power input required, in hp, to pump 0.8 ft3 /s of water. Does the water temperature at the inlet have any significant effect on the required flow power

Answers

Answer:

[tex]Power=11.52hp[/tex]

Explanation:

Given data

[tex]p_{1}=15psia\\p_{2}=70psia\\V_{ol}=0.8ft^{3}/s[/tex]

As

[tex]m=p*V_{ol}[/tex]

Assuming in-compressible flow p is constant

The total change in system mechanical energy calculated as:

Δe=(p₂-p₁)/p

The Power can be calculated as

[tex]P=W\\P=m(delta)e\\P=p*V_{ol}*(p_{2}-p_{1})/p\\ P=V_{ol}*(p_{2}-p_{1})\\P=44(psia.ft^{3}/s )*[(\frac{1Btu}{5.404psia.ft^{3} } )-(\frac{1hp}{0.7068Btu/s } )]\\P=11.52hp[/tex]    

The power input required to pump 0.8 ft³/s of water is; P = 11.52 hP

We are given;

Initial pressure; P1 = 15 psia

Final pressure; P2 = 70 psia

Volume flow rate; V' = 0.8 ft³/s

The formula for the mass flow rate is;

m' = ρV'

The total change in the mechanical energy of the system is;

△E = (P2 - P1)/ρ

Now, formula for power is;

P = m' × △E

P = ρV' × (P2 - P1)/ρ

P = V'(P2 - P1)

P = 0.8(70 - 15)

P = 44 psia.ft³/s

Converting to Btu/s gives;

P = 8.142 btu/s

Converting Btu/s to HP from conversion tables gives; P = 11.52 hP

Read more about Power input at; https://brainly.com/question/5684937

The lattice constant of a body centered cubic unit cell is a=4.85 oA. Determine the volume density of atoms. (Hints: Volume density=number of unit cell atoms/unit cell volume).

Answers

Answer:

the volume density of atoms = 1.75 x 10^22 /cm3

Explanation:

The detailed steps is as shown in the attached file.

A submarine dives at a constant speed pf 3 m/s. It is know that the water pressure increase at a rate of one atmospheric pressure (105 Pa) per 10 meter of depth. Find the time rate of pressure change measured by the submarine.

Answers

Answer:

dP/dt =  0.3003003003

Explanation:

speed of submarine = 3m/s

rate of change of pressure with depth = (105 Pa) per 10 meter of depth

to get time taken by the submarine to cover 10m ; t = 10/3 = 3.33s

time rate of change of pressure = dP/dt =  105 Pa/3.33

= 30030.03003or 0.3003003003

c.Task 3: an application program where the user enters the price of an item and the program computes shipping costs. If the item price is $100 or more, then shipping is free otherwise it is 2% of the price. The program should output the shipping cost and the total price.

Answers

Answer:

//Program is written in C++ language

// Comments explains difficult lines

#include<iostream>

using namespace std;

int main (){

//Variable declaration

double price, shipping;

cout<<"Item Price: ";

cin>>price;

//Test price for shipping fee

shipping = 0; //Initialise shipping fee to 0 (free)

if(price <100)

{

shipping = 0.2 * price;

}

//The above if statement tests if item price is less than 100.

//If yes, then the shipping fee is calculated as 20% of the item price

//Else, (if item price is at least 100), shipping fee is 0, which means free

if(shipping != 0)

{

cout<<"Shipping fee is "<<shipping;

}

else

{

cout<<"Item will be shipped for free";

}

return 0;

}

the car travels around the circular track having a radius of r=300 m such that when it is at point A it has a velocity of 5m/s which is increasing at the rate of v =(0.06t) m/s^2, where t is in seconds. Determine the magnitudes of its velocity and accerlation when it has traveled one third of the way around the track

Answers

The magnitude of the velocity and the acceleration is 0.06 m/s^2., the velocity is 11 m/s

How to solve for the velocity and the acceleration

Given the information, we can calculate the velocity and acceleration of the car as it moves one-third of the way around the circular track.

First, we need to find the time t when the car has traveled one-third of the way around the track. The distance traveled by the car in one-third of the way around the track is d = r/3, where r is the radius of the track. The velocity of the car at time t is v = 5 + 0.06t. The distance traveled by the car can be found using the equation d = vt. Setting these two equations equal to each other, we have:

d = r/3 = 5t + 0.03t^2

Solving for t, we find that t = 20 seconds.

Next, we can find the velocity of the car at time t = 20 seconds using the equation v = 5 + 0.06t = 5 + 0.06 * 20 = 11 m/s.

Finally, the acceleration of the car can be found using the equation a = dv/dt = 0.06 m/s^2.

So, when the car has traveled one-third of the way around the track, its velocity is 11 m/s and its acceleration is 0.06 m/s^2.

Read more on velocity and acceleration here:https://brainly.com/question/460763

#SPJ1

Toyota customers have a wide range of preferences. Some prefer the fuel economy of a hybrid (Prius), some prefer a family van (Odyssey), and others may prefer a large SUV (Highlander). This is an example of

Answers

Answer:

Product segmentation

Explanation:

Product segmentation is an adaptable method for gathering items. Likewise to an objective gathering, an item fragment contains all items that have a specific blend of item qualities.  

You can utilize item sections in a battle to improve key figure arranging.  

The significance of market division is that it permits a business to exactly arrive at a purchaser with explicit needs and needs.

Group of answer choices:

A) differences in willingness to pay

B) horizontal differentiation

C) segmentation

D) vertical differentiation

E) mass customization

Answer:

The correct answer is letter "C": segmentation.

Explanation:

Market segmentation is the classification of companies that make up their customers based on features such as age, gender, income, and profession, just to mention a few. By segmenting the market, firms group consumers with certain characteristics that enable the institution to specialize in the analysis of that particular sector to provide them with a tailored product or service that they are more likely to purchase.

Therefore, Toyota is segmenting its market in economic vehicles (Prius), size of the family (Odyssey), and large SUV (Highlander) to better fit consumer needs and preferences.

// Program decides tuition based on several criteria: // 1 - 12 credit hours @ $150 per credit hour // 13 - 18 credit hours, flat fee $1900 // over 18 hours, $1900 plus $100 per credit hour over 18 // If year in school is 4, there is a 15% discount using System; using static System.Console; class DebugFour3 { static void Main() { int credits; year; string inputString; double tuition; const int LOWCREDITS = 12; const int HIGHCREDITS = 18; const double HOURFEE = 15000; const double DISCOUNT = 0.15; const double FLAT = 1900.00; const double RATE = 100.00; const int SENIORYEAR = 4; WriteLine("How many credits? "); inputString = ReadLine(); credits = Convert.ToInt32(inputString); WriteLine("Year in school? "); inputString = Readline(); year = Convert.ToInt32(inputString); if(credits > LOWCREDITS) tuition = HOURFEE * credits; else if(credits == HIGHCREDITS) tuition = FLAT; else tuition = FLAT + (credits - HIGHCREDITS) * RATE; if(year < SENIORYEAR) tuition = tuition - (tuition * DISCOUNT); WriteLine("For year {0}, with {1} credits", year, credits); WriteLine("Tuition is {0}", tuition.ToString("C")); } }

Answers

Answer:

using System.IO;

using System;

class Program

{

static void Main()

{

int credits, year;

string inputString;

double tuition;

const int LOWCREDITS = 12;

const int HIGHCREDITS = 18;

const double HOURFEE = 15000;

const double DISCOUNT = 0.15;

const double FLAT = 1900.00;

const double RATE = 100.00;

const int SENIORYEAR = 4;

Console.WriteLine("How many credits? ");

inputString = Console.ReadLine();

credits = Convert.ToInt32(inputString);

Console.WriteLine("Year in school? ");

inputString = Console.ReadLine();

year = Convert.ToInt32(inputString);

if(credits > LOWCREDITS)

tuition = HOURFEE * credits;

else if(credits == HIGHCREDITS)

tuition = FLAT;

else

tuition = FLAT + (credits - HIGHCREDITS) * RATE;

if(year < SENIORYEAR)

tuition = tuition - (tuition * DISCOUNT);

Console.WriteLine("For year {0}, with {1} credits",year, credits);

Console.WriteLine("Tuition is {0}", tuition.ToString("C"));

}

You haven't declared the type for the year variable in Main. There's a typo in Readline(); it should be ReadLine().

Here's the corrected version of your code:

using System;

using static System.Console;

class DebugFour3

{

   static void Main()

   {

       int credits, year; // Declare type for year

       string inputString;

       double tuition;

       const int LOWCREDITS = 12;

       const int HIGHCREDITS = 18;

       const double HOURFEE = 150.00; // Corrected constant

       const double DISCOUNT = 0.15;

       const double FLAT = 1900.00;

       const double RATE = 100.00;

       const int SENIORYEAR = 4;

       WriteLine("How many credits? ");

       inputString = ReadLine();

       credits = Convert.ToInt32(inputString);

       WriteLine("Year in school? ");

       inputString = ReadLine();

       year = Convert.ToInt32(inputString);

       if (credits > LOWCREDITS)

           tuition = HOURFEE * credits;

       else if (credits <= HIGHCREDITS) // Corrected condition

           tuition = FLAT;

       else

           tuition = FLAT + (credits - HIGHCREDITS) * RATE;

       if (year < SENIORYEAR)

       {

           // Corrected calculation for discount

           tuition = tuition - (tuition * DISCOUNT);

       }

       WriteLine("For year {0}, with {1} credits", year, credits);

       WriteLine("Tuition is {0}", tuition.ToString("C"));

   }

}

Consider the following two well-mixed, isothermal gas-phase batch reactors for the elementary and irreversible decomposition of A to B given by the following chemical equation: A k −−→ 2 B (1) In reactor 1, the reactor volume is held constant (reactor pressure therefore changes). In reactor 2, the reactor pressure is held constant (reactor volume therefore changes). Both reactors are charged with pure A at 2.0 atm, A and B are considered ideal gases, and k = 0.35 min−1 .

(a) What is the fractional decrease in the concentration of A in reactors 1 and 2 after five minutes?
(b) What is the total molar conversion of A in reactors 1 and 2 after five minutes?

Answers

Answer:

attached below

Explanation:

Charge of uniform surface density (4.0 nC/m2 ) is distributed on a spherical surface (radius = 2.0 cm). What is the total electric flux through a concentric spherical surface with a radius of 4.0 cm?

Answers

To solve this problem we will use the values of the density on surface, which relates the total load and the area of the surface. From there we will get the total charge, which will allow us to find the electric flow.

Surface density is defined as,

[tex]\mu= \frac{Q_{tot}}{A_{surface}}[/tex]

Where,

[tex]A_{surface} = 4\pi r^2[/tex]

Replacing,

[tex]4*10^{-9} = \frac{Q_{tot}}{(4\pi 0.02^2)}[/tex]

[tex]Q_{tot}= 20.11*10^{-2} C[/tex]

At the same time electric flux can be defined as,

[tex]\Phi = \frac{Qtot}{\epsilon_0}[/tex]

Here,

[tex]\epsilon_0 =[/tex] Permittivity vacuum constant

Replacing,

[tex]\Phi =\frac{(20.11 * 10-12 )}{(8.85 * 10-12)}[/tex]

[tex]\Phi =2.27N \cdot m^2 \cdot C^{-1}[/tex]

Therefore the total electric flux through the concentric spherical surface is [tex]2.27Nm^2/C[/tex]

Through conc. spherical surface, the total electric flux will be:

"2.27 N.m².C⁻¹".

Electric flux

Uniform surface density charge, [tex]A_{surface}[/tex] = 4.0 nC/m²

Radius, r = 2.0 cm, or

               = 0.02

We know the relation,

→ Surface density, μ = [tex]\frac{Q_{tot}}{A_{surface}}[/tex]

Here, [tex]A_{surface}[/tex] = 4πr²

                [tex]Q_{tot}[/tex] = 20.11 × 10⁻² C

Now,

Electric flux, [tex]\Phi[/tex] = [tex]\frac{Q_{tot}}{\epsilon_0}[/tex]

By substituting the values,

                           = [tex]\frac{20.11\times 10^{-12}}{8.85\times 10^{-12}}[/tex]

                           = 2.27 N.m².C⁻¹

Thus the above response is correct.

Find out more information about electric flux here:

https://brainly.com/question/1592046

A quarter-circle block with a vertical rectangular end is attached to a balance beam as shown in Fig. 1. Water in the tank puts a hydrostatic pressure force on the block which causes a clockwise moment about the pivot point. This moment is balanced by the counterclockwise moment produced by the weight placed at the end of the balance beam. The purpose of this experiment is to determine the weight, W, needed to balance the beam as a function of the water depth, h.
For a given water depth, h, determine the hydrostatic pressure force, FR = γhcA, on the vertical end of the block. Also determine the point of action of this force, a distance yR – yc below the centroid of the area. Note that the equations for FR and yR – yc are different when the water level is below the end of the block (h < R2 – R1) (partially submerged) than when it is above the end of the block (h > R1 – R2) (fully submerged).
(a) Sketch the problem for a fully immersed block. Find W = f1 (h) symbolically. Then substitute for the constants. Obtain a linear relation for W as a function of h.
(b) Sketch the problem for a partially immersed block. Find W = f2 (h) symbolically. Then substitute for the constants. Obtain a cubic relation for W as a function of h.

Answers

Answer:

See attachment below

Explanation:

There is an electric field near the Earth's surface whose magnitude is about 145 V/m . How much energy is stored per cubic meter in this field? Express your answer using two significant figures.

Answers

Answer:

u_e = 9.3 * 10^-8 J / m^3  ( 2 sig. fig)

Explanation:

Given:

- Electric Field strength near earth's surface E = 145 V / m

- permittivity of free space (electric constant) e_o =  8.854 *10^-12 s^4 A^2 / m^3 kg

Find:

- How much energy is stored per cubic meter in this field?

Solution:

- The solution requires the energy density stored between earth's surface and the source of electric field strength. The formula for charge density is given by:

                                        u_e = 0.5*e_o * E^2

- Plug in the values given:

                                        u_e = 0.5*8.854 *10^-12 *145^2

                                        u_e = 9.30777 * 10^-8  J/m^3

The following questions present a twist on the scenario above to test your understanding.

Suppose another stone is thrown horizontally from the same building. If it strikes the ground 67 m away, find the following values.
(a) time of flight
s

(b) initial speed
m/s

(c) speed and angle with respect to the horizontal of the velocity vector at impact
m/s

Answers

Answer:

a) t = √(2*h/g)

b) v₀ = 67*√(g/(2*h))

c) ∅ = tan⁻¹(2*h/67)

Explanation:

Suppose that the height of the building is known (h), then we have

a) y = h = g*t²/2

then the time of flight is

t = √(2*h/g)

b) The initial speed (v₀) can be obtained as follows

x = v₀*t    ⇒    v₀ = x / t

where

x = xmax = 67 m    and  t = √(2*h/g)

So, we have

v₀ = 67 / √(2*h/g) = 67*√(g/(2*h))

c) In order to get the speed and the angle with respect to the horizontal of the velocity vector at impact, we obtain vx and vy as follows

vx = v₀ = 67*√(g/(2*h))

and

vy = gt = g*√(2*h/g)   ⇒   vy = √(2*h*g)

then we apply

v = √(vx² + vy²) = √((67*√(g/(2*h)))² + (√(2*h*g))²)

⇒  v = √(g*(4489 + 4*h²)/(2*h))

The angle is obtained as follows

tan ∅ = vy / vx     ⇒    tan ∅ = √(2*h*g) / 67*√(g/(2*h))

⇒ tan ∅ = 2*h / 67    ⇒   ∅ = tan⁻¹(2*h/67)

A man can swim at 4 ft / s in still water. He wishes to cross the 40-ft-wide river to point B, 30 ft downstream. The river flows with a velocity of 2 ft / s. Note: While in the water he must not direct himself toward point B to reach this point.

Answers

Final answer:

The question involves calculating the direction a swimmer must aim to reach a specified point across a river, accounting for his swimming speed and the river's current. It illustrates a problem of relative motion and vector resolution in mathematics.

Explanation:

The question concerns a man wanting to cross a 40-ft-wide river to a point 30 ft downstream. This scenario involves relative motion in physics, but the calculation primarily uses mathematics to solve. The man can swim at 4 ft/s in still water, and the river flows at 2 ft/s.

To determine the direction the man must swim to reach point B directly across the river, we consider two components of motion: his speed in still water and the river's current. However, the original question indicates he must not swim directly toward point B due to the river's current. Instead, he should aim upstream at a specific angle that compensates for the downstream drift caused by the current.

Without additional details, we can provide a general explanation. The man's effective speed across the river (perpendicular to the current) remains 4 ft/s. To reach point B 30 ft downstream, he must calculate the angle to offset the river's 2 ft/s current. Typically, this involves using trigonometric functions to resolve the swimmer's velocity vector into components parallel and perpendicular to the river flow.

a) the pre-exponential factor and activation energy for the hydrolysis of t-butyl chloride are 2.1xE16 sec-1 and 102 kJ mol-1, respectively. calculate the values of delta S and delta H at 286 K for the reaction.
b)the pre-exponential factor and activation energy for the gas-phase cycloaddition of maleic anyhyrdride and cycopentadiene are 5.9xE7 M-1S-1 and 51 kJ mol-1 respectively. calculate values of delta S and delta H at 293 K for the reaction.

Answers

Answer:

Delta S = 356.64J/mol and Delta H = 99620J/mol

Explanation:

The detailed steps and appropriate use of the arrehenius equation and necessary susbtitution were made as shown in the attached file.

Peter the postman became bored one night and, to break the monotony of the night shift, he carried out the following experiment with a row of mailboxes in the post office. These mailboxes were numbered 1 through 150, and beginning with mailbox 2, he opened the doors of all the even-numbered mailboxes, leaving the others closed. Next, beginning with mailbox 3, he went to every third mail box, opening its door if it were closed, and closing it if it were open. Then he repeated this procedure with every fourth mailbox, then every fifth mailbox, and so on. When he finished, he was surprised at the distribution of closed mailboxes. Write a program to determine which mailboxes these were.

Answers

Answer:

//This Program is written in C++

// Comments are used for explanatory purpose

#include <iostream>

using namespace std;

enum mailbox{open, close};

int box[149];

void closeAllBoxes();

void OpenClose();

void printAll();

int main()

{

closeAllBoxes();

OpenClose();

printAll();

return 0;

}

void closeAllBoxes()

{

for (int i = 0; i < 150; i++) //Iterate through from 0 to 149 which literarily means 1 to 150

{

box[i] = close; //Close all boxes

}

}

void OpenClose()

{

for(int i = 2; i < 150; i++) {

for(int j = i; j < 150; j += i) {

if (box[j] == close) //Open box if box is closed

box[j] = open;

else

box[j] = close; // Close box if box is opened

}

}

// At the end of this test, all boxes would be closed

}

void printAll()

{

for (int x = 0; x < 150; x++) //use this to test

{

if (box[x] = 1)

{

cout << "Mailbox #" << x+1 << " is closed" << endl;

// Print all close boxes

}

}

}

Explanation:

A ½ in diameter rod of 5 in length is being considered as part of a mechanical
linkage in which it can experience a tensile loading and unloading during application. The
material being considered is a standard aluminum bronze with a Young’s modulus of 15.5 Msi.
What is the maximum load the rod can take before it starts to permanently elongate?
Considering the rod is designed so that it does not yield, what is the maximum energy that the
rod would store? [Hint: You can look up some properties of aluminum bronze in your machine
design book].

Answers

Answer:

The maximum load the rod can take before it starts to permanently elongate =  = 6086.84 lbf or 27075.59 N

The maximum energy that the  rod would store =2.536 ft·lbf or 3.439 J

Explanation:

We list out the variables to the question as follows

Rod diameter = 0.5 in

Length of rod = 5 in

Young's modulus of elasticity for the material = 15.5 Msi

The maximum load rthe rd can take before it starts to permanently elongate is the yield stress and it can vbe calclulated by applyng the 0.2% offset rule by taking the yeild strain to be equal to 2%

Thus Young's Modulus at yield point =[tex]\frac{Stress}{Strain}[/tex] so that the yield stess is

Yield stress = strain × Young's Modulus

= 2/100 × E = 0.002 × 15.5 Msi = 0.031 Msi = 31 ksi

The maximum load that the rod would take before it starts to permanently elongate = F = Stress×Area

where area = π·D²/4 = 0.196 in²

F = 31 kSi × 0.196 in² = 6086.84 lbf or 27075.59 N

To calculate the strain energy stored in the rod we apply the strain energy formula thus

U = V×σ²/2·E

To calculate the volume we have V = L ×π·D²/4 =5 in × 0.196 in² = 0.98 in³

then U = 0.98 × (31000)²/(2·15.5×10⁶)

= 30.43 in³·psi = 2.536 ft·lbf

or 3.439 J

The maximum energy that the rod would store = 2.536 ft·lbf

2) The magnetic field at a distance of 2 cm from a current carrying wire is 4 μT. What is the magnetic field at a distance of 4 cm from the wire?

Answers

Answer:

2 μT

Explanation:

Assuming that the diameter of the current carrying wire is very small compared with its length, we can treat it as an infinite wire.

For an infinite wire, the magnetic field, at a distance r from the wire, is given by Biot-Savart law equation, as follows:

[tex]B = \frac{\mu0*I}{2*\pi*r}[/tex]

where:

μ₀ = 4*π*10⁻⁷

I = current carried by the wire

r = distance from the wire.

So, B₁ can be calculated as follows:

[tex]B1 = \frac{\mu0*I}{2*\pi*0.02m} = 4e-6 T[/tex]

If we change the distance where we want to know the value of B, all other factors remain constant, we can write the following expression for the new value of B, B₂:

[tex]B2 = \frac{\mu0*I}{2*\pi*0.04m}[/tex]

Dividing B1 by B2, and simplifying common terms, we have:

[tex]\frac{B1}{B2} = \frac{0.04m}{0.02m} = 2[/tex]

⇒ [tex]B2 = \frac{B1}{2} = \frac{4e-6T}{2} = 2e-6 T[/tex]

B₂ = 2 μT

What is the energy change when the temperature of 15.0 grams of solid silver is decreased from 37.3 °C to 20.5 °C ?

Answers

Answer:

Q=58.716 W

Explanation:

Given that

mass ,m  = 15 g

The decrease in the temperature ,ΔT = 37.3 - 20.5  °C

ΔT = 16.8°C

We know that specific heat of silver ,Cp = 0.233 J/g°C

The energy change of the silver  is given as

Q = m Cp ΔT

Now by putting the values we get

[tex]Q= 15 \times 0.233\times 16.8\ W[/tex]

Q=58.716 W

Therefore the change in the energy will be 58.716 W.

g Let the charges start infinitely far away and infinitely far apart. They are placed at (6 cm, 0) and (0, 3 cm), respectively, from their initial infinite positions. A. Determine the electric potential due to the two charges at the origin. B. Determine the electric potential energy associated with the system, relative to their infinite initial positions.

Answers

Answer:

a) V =10¹¹*(1.5q₁ + 3q₂)

b) U = 1.34*10¹¹q₁q₂

Explanation:

Given

x₁ = 6 cm

y₁ = 0 cm

x₂ = 0 cm

y₂ = 3 cm

q₁ = unknown value in Coulomb

q₂ = unknown value in Coulomb

A) V₁ = Kq₁/r₁

where   r₁ = √((6-0)²+(0-0)²)cm = 6 cm = 0.06 m

V₁ = 9*10⁹q₁/(0.06) = 1.5*10¹¹q₁

V₂ = Kq₂/r₂

where   r₂ = √((0-0)²+(3-0)²)cm = 3 cm = 0.03 m

V₂ = 9*10⁹q₂/(0.03) = 3*10¹¹q₂

The electric potential due to the two charges at the origin is

V = ∑Vi = V₁ + V₂ = 1.5*10¹¹q₁ + 3*10¹¹q₂ = 10¹¹*(1.5q₁ + 3q₂)

B) The electric potential energy associated with the system, relative to their infinite initial positions, can be obtained as follows

U = Kq₁q₂/r₁₂

where

r₁₂ = √((0-6)²+(3-0)²)cm = √45 cm = 3√5 cm = (3√5/100) m

then

U = 9*10⁹q₁q₂/(3√5/100)

⇒ U = 1.34*10¹¹q₁q₂

Other Questions
what word did she consider synonymous to revolutionary? transformation, fighting, combat, rebellion The blackbody curve of a star moving toward Earth would have its peak shifted (a) to lower intensity; (b) toward higher energies; (c) toward longer wavelengths; (d) toward lower energies. Jackie made $28 babysitting last week. Her brother Joe made only 80% as much as she did. How much did Joe make? what charge will a group 16 anion have solve the system of equations 2x+2y=6z=8 5x+6y+5z=3 5x+6y+3z=5 Which word BEST describes Hummingbird? In each of the following independent cases the company closes its books on December 31.1.Sanford Co. sells $500,000 of 10% bonds on March 1, 2014. The bonds pay interest on September 1 and March 1. The due date of the bonds is September 1, 2017. The bonds yield 12%. Give entries through December 31, 2015.2. Titania Co. sells $400,000 of 12% bonds on June 1, 2014. The bonds pay interest on December 1 and June 1. The due date of the bonds is June 1, 2018. The bonds yield 10%. On October 1, 2015, Titania buys back $120,000 worth of bonds for $126,000 (includes accrued interest). Give entries through December 1, 2016.For the two cases prepare all of the relevant journal entries from the time of sale until the date indicated. Use the effective-interest method for discount and premium amortization (construct amortization tables where applicable). Amortize premium or discount on interest dates and at year-end. (Assume that no reversing entries were made.) Six friends are going to the state fair. The cost of one admission is $9.50, and the cost for one ride on the Ferris wheel is $1.50. Write two equivalent expressions and then find the total cost. Fred Arden is tried in a criminal court and found innocent of the charge of theft. Shawn Finister, the victim of the alleged crime, sues Fred in civil court to recover damages for civil conversion. The tort claim involves the same act for which Fred was found innocent in the criminal court. Which of the statements below is false? a. Although such suits may be brought, plaintiffs seldom do so because criminal defendants are often judgment proof. b. The civil court filing must be dismissed because of the constitutional right against double jeopardy. c. Fred could also be sued if he had been found guilty. d. The suit may be brought and recovery is possible in part because the burden of proof is less demanding in a civil trial. A 2.65 g sample of an unknown gas at 33 C and 1.00 atm is stored in a 2.85 L flask. What is the density of the gas? A shoreline runs north-south, and a boat is due east of the shoreline. The bearings of the boat from two points on the shore are 110 and 100. Assume the two points are 550 ft apart. How far is the boat from the shore? Use the order of operations and the digits 2, 4, 6, and 8 to create an expression with a value 2. E-Sign: a. applies only to interstate transactions. b. must still be adopted by the states to be effective. c. does not apply to contracts for the sale of goods. d. applies in all 50 states. e. none of the above Lucia's back hurts! She figured out that the books in her backpack are 5 times heavier than the backpack itself. By what percent heavier is the backpack with the books inside, than the books by themselves? Jenna wants to learn whether men or women are better drivers. To determine this, she decides that she will measure driving ability by examining the number of automobile accidents people have been involved in as the driver. Whether the persona is male or female is the...? A regular square pyramid has a height of 6 and a base with sides of length 12. What is the: Lateral area of the pyramid? A cars velocity as a function of time is given by vx(t) = + t2, where = 3.00 m/s and = 0.100 m/s3. (a) Calculate the average acceleration for the time interval t = 0 to t = 5.00 s. (b) Calculate the instantaneous acceleration for t = 0 and t = 5.00 s. (c) Draw vx-t and ax-t graphs for the cars motion between t = 0 and t = 5.00 s. The amount of juice in a grapefruit is directly proportional to the cube of its diameter. Let j represent the amount of juice (in fluid ounces) in a grapefruit, let d represent the diameter (in inches) of the grapefruit, and let k be the constant of proportionality. Write an equation that relates j to d. Tipeni bought 100 shares in a bank for $35.60 each. He sold them two years later for $48.90 each and paid a brokerage fee of $32.95.a) what is the profit made on these shares? I need help with a please Im dying In Hamlets famous speech, sometimes referred to as the "What a piece of work is a man," what is the philosophical belief held by Hamlet about mans place in the universe, and what is the name of that philosophy?