a) Draw a flowchart for the following problem.
Suppose that you work for a beverage company. The company wants to know the optimal cost for a cylindrical container that holds a specified volume. Your program should ask user before iterating loop. Let say there are 10 users that will going to use the system. During each iteration of the loop, your program will ask the user to enter the volume and the radius of the cylinder. Compute and display the height and the cost of the container. Use the following formulas, where V is the volume, r is the radius, h is the height, and C is the cost.
h = V
r2
Question : implement the fundamental task of obtaining data from the person at the keyboard in order to compute a score to evaluate them for employment.
1: Prepare one separate numeric variable to hold an additional, constant piece of useful information about the user. Ensure the variable’s value, after its declaration, cannot be changed by your program’s statements.
2: Prompt the user with a printout to explain what to do, then read in one textual value from the keyboard for the name Prompt the user with a printout to explain what to do, then read in one integer numeric value from the keyboard, a value useful to evaluate the user for a job position of your choice of the person typing
3: compute a numeric value that can be used to determine whether the job application will be considered, and print out the value, including the name of the applicant, in an informative message. Use at least two different types of arithmetic
Design and implement a GUI program to convert a positive number given in one base to another base. For this problem, assume that both bases are less than or equal to 10. Consider the sample data:
number = 2010, base = 3, and new base = 4.
In this case, first convert 2010 in base 3 into the equivalent number in base 10 as follows:
2 * 33 + 0 * 32 + 1 * 3 + 0 = 54 + 0 + 3 + 0 = 57
To convert 57 to base 4, you need to find the remainders obtained by dividing by 4, as shown in the following:
57 % 4 = 1,
quotient = 14 14 % 4 = 2,
quotient = 3 3 % 4 = 3,
quotient = 0.
Therefore, 57 in base 4 is 321.
Write a GUI program to compute the amount of a certificate of deposit on maturity. The sample data follows:
Amount deposited: 80000.00
Years: 15
Interest rate: 7.75
Hint: To solve this problem, compute 80000.00 (1 + 7.75 / 100)15.
Write a GUI program that converts seconds to years, weeks, days, hours, and minutes. For this problem, assume 1 year is 365 days.
Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format:
testscore1 weight1
...
For example, the sample data is as follows:
75 0.20
95 0.35
85 0.15
65 0.30
The user is supposed to enter the data and press a Calculate button. The program must display the weighted average.
Your local public library wants to design new software to keep track of patrons, books, and lending activity. List at least three classes you think should be in the design. For each class, identify some data members and methods.
The Custom Consulting Company (CCC) places temporary computer professionals in companies that request such employees. CCC’s business can be explained as follows:
CCC keeps a list of professionals willing to work or currently working on a temporary assignment. A professional may have up to three qualifications, including programmer, senior programmer, analyst, tester, designer, and so on. A company always requests a professional with a single specific qualification. CCC keeps a list of all its clients (that is, a list of other companies) and their current needs. If CCC can find a match, a professional with the required qualification is assigned to a specific opening at one of CCC’s clients.
Identify at least five classes and, for each class, list possible data members and methods.
Correct the syntax errors in the following program:
public class RTwo extends JFrame
{
public RTwoProgram()
{
private JLabel length, width, area;
setTitle("Good day Area");
length = JLabel("Enter the length);
width = JLabel("Enter the width);
area = JLabel("Area: ");
containerPane = ContentPane();
pane.setLayout(GridLayout(4,1));
setSize(WIDTH,HEIGHT);
setVisible();
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
public static void main(String args[])
{
RTwoProgram R2 = new RTwoProgram();
}
}
Correct the syntax errors in the following program and add any additional statements necessary to make the program work:
import javax.jswing.*;
public class ROne extends JFrame
{
static private final int WIDTH = 400;
static private final int HEIGHT = 300;
public RectangleProgramOne()
{
setTitle("Welcome");
setSize(WIDTH,HEIGHT);
SetVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
public static void main(String args[])
{
ROne r1 = r1();
}
}