[solved] – Question 875

Is

String myString = “Object oriented programming with Java”;

a valid Java assignment statement. ?

Expert Answer


[solved] – Question 87511

Question 2 (Marks: 50)
The system to be developed for Williams and Son needs to produce the following slip for a
customer once the sale has been concluded.
Please note: For the purpose of this assignment, assume that a customer will only purchase one
unit of each item.
Q.2.1 Write the pseudocode that will produce a slip similar to the one illustrated at
the beginning of the question. Your solution should satisfy the following
requirements:
 The solution must illustrate the use of good programming practices;
 The solution must make use of a loop;
 The loop must make use of a sentinel value.

Q.2.2 The mainline logic of almost every procedural program consists of three parts
namely housekeeping tasks, detail loop tasks and end-of-job tasks. By making
use of flowcharts, show how these parts can be implemented in your solution
for Question 2.1.

Q.2.3 All of your solutions should be structured. Explain why your solution can be
considered a structured solution.

Expert Answer


[solved] – Question 87523

The heating system in a school should be switched on if the average temperature is less than 20 degrees Celsius. The average temperature is found from the temperatures in the Maths, English and Science departments. You are required to write a C++ program that allows the user to input 3 temperatures. The program calculates and displays the average temperature and then displays “heating should be turned on ” or ” heating should be turned off” as appropriate.

Expert Answer


[solved] – Question 87539

Assignment 2: Room Area
Room shape

For this lab you will find the area of an irregularly shaped room with the shape as shown above.

Ask the user to enter the values for sides A, B, C, D, and E and print out the total room area.

Remember the formula for finding the area of a rectangle is length * width and the area of a right triangle is 0.5 * the base * height.

Please note the final area should be in decimal format.

Sample Run

Enter side A: 11
Enter side B: 2
Enter side C: 4
Enter side D: 7
Enter side E: 1
Output

Room Area: 53.5

Expert Answer


[solved] – Question 87565

Create class name(city) which have data for average tempreture accept data from user for 5 different cities and display the information in screen.

Expert Answer


[solved] – Question 87568

Q3 Example Questions:
For each example question, use a record that contains two fields, id and gpa. id is an integer and gpa is a float. (for the list problem, it also has a NEXT field which is a pointer to the structure). Write a complete program that demonstrates the solution to the problem.

(a) Stack: Create 3 records ( {100,2.0}, {200,3.0}, 300,3.8} ). Use a stack to print them out in reverse order. The stack has a size of 5.

(b)Queue: Create 3 records ( {100,2.0}, {200,3.0}, 300,3.8} ). Insert them in a queue. Empty out the queue and print out the structures. The queue has a size of 5

(c)Write a program that inserts these structures in an ordered linked list. ( {100,2.0}, {200,3.0}, 300,3.8}. The list needs to be ordered by gpa.

Expert Answer


[solved] – Question 87593

Can I use Line In (Rear Port) to audio output Jack?

Expert Answer


[solved] – Question 87596

Flowchart for printing a name for 10 times

Expert Answer


[solved] – Question 87603

Define a structure Triangle that contains three Point members. Write a function that computes the perimeter of a Triangle. Write a program that reads the coordinates of the points, calls your function, and displays the result.

Expert Answer


[solved] – Question 8763

Write a payroll program that prompt a user to Enter his/her name, hourly rate, working hours in the week and display the amount earning by each employee in Rand.
Note: User is not allowed to enter any negative value for hourly rate and working hours

Expert Answer