Answer:
//Annual calendar
#include <iostream>
#include <string>
#include <iomanip>
void month(int numDays, int day)
{
int i;
string weekDays[] = {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"};
// Header print
cout << "\n----------------------\n";
for(i=0; i<7; i++)
{
cout << left << setw(1) << weekDays[i];
cout << left << setw(1) << "|";
}
cout << left << setw(1) << "|";
cout << "\n----------------------\n";
int firstDay = day-1;
//Space print
for(int i=1; i< firstDay; i++)
cout << left << setw(1) << "|" << setw(2) << " ";
int cellCnt = 0;
// Iteration of days
for(int i=1; i<=numDays; i++)
{
//Output days
cout << left << setw(1) << "|" << setw(2) << i;
cellCnt += 1;
// New line
if ((i + firstDay-1) % 7 == 0)
{
cout << left << setw(1) << "|";
cout << "\n----------------------\n";
cellCnt = 0;
}
}
// Empty cell print
if (cellCnt != 0)
{
// For printing spaces
for(int i=1; i<7-cellCnt+2; i++)
cout << left << setw(1) << "|" << setw(2) << " ";
cout << "\n----------------------\n";
}
}
int main()
{
int i, day=1;
int yearly[12][2] = {{1,31},{2,28},{3,31},{4,30},{5,31},{6,30},{7,31},{8,31},{9,30},{10,31},{11,30},{12,31}};
string months[] = {"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"};
for(i=0; i<12; i++)
{
//Monthly printing
cout << "\n Month: " << months[i] << "\n";
month(yearly[i][1], day);
if(day==7)
{
day = 1;
}
else
{
day = day + 1;
}
cout << "\n";
}
return 0;
}
//end
Answer:
A=False
B=False
C=False
D=False
E=False
F=False
Explanation:
A. In an isothermal process, only the reversibly heat transfer is 0,
B. Consider the phase change of boiling water. Here, the temperature remains constant but the internal energy of the system increases.
C. This is not true even in reversible process, as can be inferred from the equation in part A.
D. This is only true in reversible processes, but not in all isothermal processes.
E. Consider the phase change of freezing water. Here, the surroundings are increasing their entropy, as they are taking in heat from the system.
F. This is not true if , like in answer B. One case where this is true is in the reversible isothermal expansion (or compression) of an ideal gas.
Answer:
Explanation:
The model for the turbine is given by the First Law of Thermodynamics:
The turbine power output is:
The volumetric flow is:
The specific volume of steam at inlet is:
State 1 (Superheated Steam)
The mass flow is:
Specific enthalpies at inlet and outlet are, respectively:
State 1 (Superheated Steam)
State 2 (Saturated Vapor)
The turbine power output is:
Answer:
Explanation:
The specific heat for watermelon above freezing point is . The heat liberated by the watermelon to cool down to 8°C is:
The heat absorbed by the household refrigerator is:
Time needed to cool the watermelons is:
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:
from the MARIE instruction set architecture. Then write the corresponding signal sequence to perform these micro-operations and to reset the clock cycle counter.
You may refer to the provided "MARIE Architecture and Instruction Set" file in the Front Matter folder.
Answer:
So these are the RTL representation:
MAR<----X
MBR<-----AC
M[MAR]<------MBR
Control signal sequence are:
P3T0:MAR<----X
P2P3 P4T1:MBR<-----AC
P0P1 P3T2:M[MAR]<------MBR
Explanation:
STORE X instruction is used for storing the value of AC to the memory address pointed by X. This operation can be done by using the Register Transfers at System Level and this can be represented by using a notation called Register Transfer Language RTL. Let us see what are the register transfer operations happening at the system level.
1. First of all the address X has to be tranfered on to the Memory Address Register MAR.
MAR<----X
2. Next we have to tranfer the contents of AC into the Memory Buffer Register MBR
MBR<-----AC
3. Store the MBR into memory where MAR points to.
M[MAR]<------MBR
So these are the RTL representation:
MAR<----X
MBR<-----AC
M[MAR]<------MBR
Control signal sequence are:
P3T0:MAR<----X
P2P3 P4T1:MBR<-----AC
P0P1 P3T2:M[MAR]<------MBR
Answer:
PART A
Design guidelines are sets of procedures to be followed in order to enhance the designing of an object or other things.
Design Performance is the actual process of carrying out the design process of an object using the design guidelines or criteria.
PART B
(1) Design guidelines tools helps to enhance design Performance.
(2) Design guidelines tools helps the designing performance tools to be effective.
Explanation:Design guidelines are the various steps which has special tools used to guide the designer in order to enhance the designing performance tools and ensure that the design process is done devoid of errors.
Design Performance tools are tools which helps to enhance the actual design Activities.