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();
}
}
HeapSort a given array with constant space complexity O(1).
Design a method that determines whether or not a binary tree is fully balanced.
This method takes no parameters, and returns a boolean value: true if the tree is
fully balanced, and false if it is not.
Write a Java program to sort a numeric array and a string array
The organisation you work for has asked you to create an interactive application that will assist with the allocation of employees to a cell phone network provider and phone number generation. You are required to prompt a user for three employee names which will randomly assign the employee to either the Vodacom, MTN or Cell C network. The employees also require a randomly generated phone number. The start of each phone number will begin with the following, depending on the network provider: NETWORK PROVIDER START Vodacom 072 MTN 083 Cell C 084 The remaining numbers of the phone number must be randomly generated
Program 2 – Seasons in the sun Create a Java application which will prompt the user to type in any month number (1-12). Implement a switch statement that will display the season. The seasons according to the months are: 1. Summer: November, December, January and February 2. Autumn: March, April and May. 3. Winter: June, July, August. 4. Spring: September and October
Sam runs a local musical equipment store in your neighbourhood. He has contracted you to create an interactive application that will assist him with customer purchases. Create a class named Customer Purchases that will contain get and set methods for a customer number, first name, surname, product, price and quantity. Create a separate class called Printing that will include a method called Print Details, that will print the Customer Invoice. In the Printing class include another method called Customer Purchase Report which will display the following information: REPORT OPTION PERCENTAGE TAX 15% COMMISSION 8.5% DISCOUNT 10% TOTAL (Price + Tax) – (Discount + Commission