All java examples in this repo
by transforming cbxax cbxax the algorithm sketched in the figure below into a Java program. The program shall output the solution with a formatted string, or, if a solution cannot be obtained, with a descriptive text message, respectively.
- A Java program shall be created which calculates the bending moment distribution of a twofield beam using the ω-approach. The following values shall be read from the user (standard input): The lengths l1 and l2 [m], the moments of intertia ly1 und ly2 [m^4] and the corresponding loads q1 and q2 [kN/m] of both fields.
- The values of the bending moment shall be evaluated at n points of each beam and be printed as a formatted string. Additionally, the number of the (n − )1 steps shall be read as user input at the beginning of the computation. The screenshot shows the formatted output of values of the x-axis and the corresponding bending moment My(x), separated by tabs. For the calculation of the bending moment My(x), the ratio of the moments of inertia j of both fields and the supporting moment Mb over the middle support are required: #######
- The bending moment distribution My(x)can be evaluated successively at both fields with:
- Write a program that creates a text file that contains a power of two table in HTML format. The file could be called twoPowerTable.html. When it is viewed with a browser you will see something like:
The file should start with something like:
<html><head>
<title>Powers of Two</title>
</head>
<body>
<table border cellpadding=5>
<tr><th>Power of 2</th><th>Value</th></tr>
And end with:
</table>
</body></html>
Each line of the table looks like:
<tr><td>0</td><td>1</td></tr>