Write a library containing functions to compute the surface area and volume of a sphere. For a sphere of radius r, these values can be calculated using: Surface Area = 4 Pi r squared (4 x Pie x r to the second power). Volume = 4 Pi r cubed/3 Write a driver program to test your library.
Write a library Cylinder containing functions to compute the total surface area, lateral surface area, and volume of a right-circular cylinder. For a cylinder of radius r and height h, these can be calculated using: Total Surface Area = 2 x Pi r(r + h) Lateral Surface Area = 2 x Pi rh Volume = Pi r squared h Write a drive ...continues
Write a program to display the lyrics of "Happy Birthday to You."
How to use Java classes to find the number of times a string is present in another string.
Write a function to count occurrences of a string in another string. Then write a driver program to input a string and then input several lines of text, using the function to count occurrences of the string in the lines of text.
Revernd Zeller developed a formula for computing the day of the week on which a given date fell or will fall. Suppose that we let a, b, c, and d be integers defined as follows: a = the number of a month of the year, with March = 1, April = 2, and so on, with January and February being counted as months 11 and 12 of the preceed ...continues
Programming Problem (Selection)
Given: To locate the nearest numbered cross street for a given avenue address, the following algorithm can be used: cancel the last diget of the address, divide by 2, and add or subtract the number given in the following abbreviated table: 1st Ave. add 3 2nd Ave. ...continues
Programming Problems (Selection)
Write a function convertLength() that receives a real value and two strings inUnits and outUnits, then converts the value given in inUnits to the equivalent metric value in outUnits and displays this value. The function should carry out the following conversions: inUnits outUnits I c ...continues
Programming Problem (Selection)
An airline vice president in charge of operations needs to determine whether the current estimates of flight times are accurate. because there is a larger possiblity of variations due to wether and air traffic in the longer flights, he allows a larger error in the time estimates for them. He compares an actual flight time with ...continues
Write a program using the mov instruction to produce the following results. Assemble and debug the problem. 1. Move the contents of register AX to registers BX, SI, and DS. 2. Move the word contents of memory location DS:1234h to memory location DS:5678h. 3. Store the number 5678h in memory location DS:2000h using indirect ...continues
Create a stack area at 1000h. Push 10h bytes, located at data memory addresses 60000h to 6000fh, on the stack using indirect addressing. Then pop the stack to memory addresses 62000h to 6200fh using indirect addressing. Load unique data into the 10h bytes in order to test the program.