Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

You have been allocated a class A network address of 29.0.0.0. You need to create at least 20 networks and each network will support a maximum of 160 hosts. Would the following two subnet masks Work?

255.255.0.0 and or 255.255.255.0
Rita has newly enrolled into the computer science course in Softech Solutions to learn c Programming , to know about data types she has given a task to solve the following expression with respective data type as ‘a’ and ‘b’ as integer ,’c’ as character , ‘ax’ as long integer, ‘s’ as short integer, ‘dx’ is double and ‘ux’ as unsigned long integer , the expression to get solved is


i)((int) dx) + ax ii) ax + b iii)ax + ux iv) s + c


Help rita to solve the task by writing the c program
ask user to input the time of the day (just the hour as an integer between 0 and 23) and decide whether it’s morning (between 0 and 12 inclusive), afternoon (between 13 and 17 inclusive), evening (between 18 and 19 inclusive), or night (between 20 and 23 inclusive).
a) Create a class named Sandwich. Data fields for this class include a String for the main ingredient (E.g. Tuna), a String for bread type (E.g. Wheat) and the third field for double data type to store the sandwich price (N$15.00). Include methods to get and set values for each of these fields. Save the class as Sandwich.java.
Create the java program called Product that prompts the user to enter names of hardware devices. The program includes a sentinel loop with a value of ### that stops the input from the user. Include a counter variable called inputnum inside the loop, that counts the number of hardware devices the user entered. Using a system statement inside the loop, display the names of hardware devices the user entered. Include a dialog box outside the loop that displays the counter variable value (number of hardware device names entered by the user).
Part 1


Encapsulate the following Python code from Section 7.5 in a function named m_sqrt that takes a as a parameter, chooses a starting value for x, and returns an estimate of the square root of a.


While True:

y= (x + a/x) / 2.0

If y== x:

break

X = y


Part 2


Write a function named test_sqrt that prints a table like in the following using a while loop, where "diff" is the absolute value of the difference between my_sprt(a) and math.sqrt(a).
Encapsulate the following Python code from Section 7.5 in a function named my_sqrt that takes a as a parameter, chooses a starting value for x, and returns an estimate of the square root of a.


while True:

y = (x + a/x) / 2.0

if y == x:

break

x = y
A child's parents promised to give the child $10 on her 12th birthday and double the gift on every subsequent birthday until the annual gift exceeded $1000. Write a C program to determine how old the child will be when the last amount is given and the total amount the child will have received.
BMI formula: BMI = weight /(height x height)

BMI Weight status

Below 18.5 Underweight

18.5‐24.9 Healthy

25.0‐29.9 Overweight

30.0 and above Obese

Write a program that calculates a person’s BMI and displays the weight status according to the BMI

value, indicating whether the person is underweight, healthy, overweight or obese. The BMI weight

statuses and related values are listed in the above table.

The program should have the following functions:

1.1. getData that prompts and returns their weight and height;

1.2. calcBMI to calculate the BMI ;

1.3. displayFitnessResults to display the BMI and relevant weight status message;

1.4. main function
Write a program in C to mimic the “adduser” command on Linux. This command will add either an ordinary user or a system user. It has to handle 2 files “passwd” and “shadow”. Both these files will be in some folder specified by an environment variable PFILE. The program has to take all arguments as command line arguments
LATEST TUTORIALS
APPROVED BY CLIENTS