
Great Applianz Ltd. was established in 1985, in New York. It deals in home appliances. Initially, it manufactured home appliances and sold them through selected stores. However, with a gradual increase in their popularity and sales, the company has opened its exclusive stores in New York. In a recent board meeting, the management has planned to expand its services to various parts of the world. The management decided to implement this service through its own website and handed this entire responsibility of developing the website to Smith, a developer. Problem Statement
The management at Great Applianz Ltd. has briefed Smith about their requirements for the proposed website. The website should provide the following functionality:
A Welcome page that gives the user a brief introduction about the company. This page should display the name of the company at the top, a brief history of the company, the services it offers, and the logo of the company.
On clicking the View Products button on the Welcome page, the Choose Appliances page opens. This page displays two categories of home appliances, kitchen appliances and other appliances. This page enables customers to choose between the two categories.
On clicking the Place an Order button on the welcome page, the Orders page opens that allows the users to buy, modify, and check the status of the orders they have placed.
Smith has to develop a Web application for Great Applianz Ltd. that incorporates the preceding functionality. In addition, Smith has to ensure the following aspects: The application supports all types of hardware and software. The application is secure over the Internet. In order to develop the Web application, Smith needs to analyze the working of the existing system. The existing system is a manual system where the shop has counters and every counter is allocated to a salesperson. When a customer comes, he/she interacts with the salesperson at a particular counter to enquire about a product. When satisfied with the details of the product, he/she can buy the product by offering the required payment. He has also observed that Great Applianz Ltd. has some discount policy for its esteemed customers. One such discount policy provides a discount of 5% to its customers on purchase of five or more items. While implementing various functionality, Smith has to ensure that the senior managers get certain privileges to view, add, or modify items. For example, while developing the application, Smith needs to create an Orders class to manage all the details regarding the orders, such as, total number of orders, orders delivered, and orders pending. The class will contain a member variable named appinfo for each appliance in order to store the name and manufacturing location of the appliance. In addition, a member variable named appID needs to be created so that it can store the value by combining the initials of the appliance name, its manufacturing location, and a unique number code. For example, if the appliance name is Refrigerator and the manufacturing location is Toronto, then the value stored in appID should be RT001, where 001 is a unique code.
1.Assume that Smith decides to implement the GridBag layout. Complete the following code snippet to implement the GridBag layout.Reffer to the statment
//import required packages public class WelcomePage extends JApplet{ JPanel mnPanel; JLabel lblCName, lblServices, lblCHistory, lblCLogo; JButton viewProd, placeOrdr; Icon image; public void init(){ mnPanel=new JPanel(); svrsPanel=new JPanel(); lblCName=new JLabel("Great Applianz Ltd."); lblServices=new JLabel("Services Offered"); lblCHistory=new JLabel("
Great Applianz Ltd., established in 1985 in New York, is a leading home appliance company. Great Applianz has QUALITY as its motto. It promises to provide high quality products at a reasonable price. It has a wide variety of home appliances, such as geysers, sandwich toasters, microwaves, and refrigerators. "); lblCName.setFont(fnt); image = new ImageIcon("D:\logo.jpg"); //logo.jpg should be available in d: lblCLogo=new JLabel(image); viewProd=new JButton("View Products"); placeOrdr=new JButton("Place an Order"); getContentPane().add(mnPanel); } }If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.