Display all workshops in a list in the startup form

Assignment Help JAVA Programming
Reference no: EM131198943

Chapter 1 - Challenge #3 - Training Workshops

Your company likes to present training workshops that help people in the information technology industry improve their skills. Your task is to write and object-oriented application that will let the company display and edit workshops.

There are several workshop categories: (1) application development, (2) databases, (3) networking, and (4) systems administration. You will create an enumerated type that matches these categories. A workshop consists of: (1) title, (2) length in days, (3) category, and (4) cost. Create a Class named Workshop that holds this information, with a complete set of properties and ToString method. It should also contain a public shared string array such as the following:

Public Shared CategoryNames ( ) As String = {"Application development" , "Databases" ,
"Networking" , "System Administration" }

Data File

When the application starts, it must read a list of workshops from a data file and store them in an array or collection. Each line in the file will be a different workshop, with the fields separated by the \ or , (backslash or comma) character. Here is a sample line from the file:

0\3\800\Programming in Java or 0,3,800,Programming in Java
(Category = 0, Days = 3, Cost = $800, Title = Programming in Java)

Create a user interface that lets the user complete the following tasks:

1. Display all workshops in a list in the startup form, as shown in Figure 1-21.

2. Select a single workshop to display in detail format in a separate window, as shown in

Figure 1-22. A combo box control should display a list of categories, with the workshop's actual category as the current selection. This window permits the user to modify the workshop fields and save all changes. If the user modifies a workshop, clicks the Save and Close button, and returns to the startup form, the workshop changes should appear in the list box.

** None of the changes are permanent because you are not required to save the modified workshop list back to the data file.

230_Fig.jpg

Implementation Suggestions

You can create a property of type Workshop in the Workshop Detailsform. Before displaying this form, assign the selected workshop (from the list box) to the Workshop Details form's Text property. When the form loads, copy the workshop property values into the text boxes and combo box.

Chapter 5 - Challenge #5 - Training Workshops

Use the Programming Challenge 3 from Chapter 1 as a starting point for this challenge.

This version is a 3-tier application.

1. Add an ID property to the Workshop class.

2. Create a database to replace the data file that was used for input in Chapter 1. In it, create a database table named Workshops that contains the workshop ID, category ID, number of days, cost of the workshop, and workshop title. Also in the database, create a Categories table that contains category ID and category description columns.

3. Create a DataSet containing table adapters based on the two database tables. In addition, create a TableAdapter That joins the two tables and contains the workshop ID, workshop category name, number of days, cost, and workshop description.

4. The Workshop class represents the middle tier. In this class, declare an instance of the TableAdaper class so you can call the TableAdapter method. Provide properties and methods in the Workshop class that are called by your MainForm and DetailsForm classes

5. Display the list of workshops in a DataGridView control, as shown in Figure 5-32. When the user selects a workshop in the grid, display the Workshop Details form, as shown in Figure 5-33. The combo box is filled from the Categories TableAdapter. The user must be able to modify a workshop in this window and save his or her changes. When the details form closes, the grid must be refreshed, so the user can see the changes he or she made. Additionally, the changes must be saved back to the database as well.

2032_Fig1.jpg

Reference no: EM131198943

Questions Cloud

Describe how your personal beliefs and values : Describe your values and beliefs that relate to nursing profession. Include perspectives on nursing, health and illness, recipients of care, and any other concepts you feel define your practice as a nurse.
List the six characteristics of an ideally insurable risk : Explain the concept of adverse selection as it relates to insurance. Provide an example of adverse selection. Explain the two major differences between insurance and gambling. List and briefly describe the six characteristics of an ideally in..
What is the market equilibrium price : Each firm in the industry is currently earning zero, economic profit. How many firms are in this industry, and what is the market equilibrium price?
Discuss planning function in context of the work of manager : TOPIC: planning tools/techniques, General framework: Discuss the planning function in the context of the work of the manager. illustrate with a case study
Display all workshops in a list in the startup form : Create a database to replace the data file that was used for input in Chapter 1. In it, create a database table named Workshops that contains the workshop ID, category ID, number of days, cost of the workshop, and workshop title.
Explain a description of a business situation : Explain A description of a business situation that presents a legal and ethical issue. A description of at least two ethical theories under which the situation will be analyzed. An explanation of the specific areas of law under which the situation wi..
Hospital after having a seizure at work : Patient was admitted to the hospital after having a seizure at work. The admitting diagnosis was to rule out epilepsy. After testing was performed, the cause of the seizure was not determined, as the physician stated the patient did not have epile..
What are the total exchange costs of someone utilizing money : What are the average lifetime search costs for an individual who uses money to make exchanges?Now let us consider exchange costs. Suppose it costs 4 units of utility to verify the quality of goods accepted in exchange and 1 unit of utility to veri..
How does hand washing relate to patient safety : Search and explore the Centers for Disease Control or the World Health Organization websites for hand washing/hand hygiene. Are you surprised at the volume of information? Provide a list of the reasons you think that people don't wash their hands...

Reviews

Write a Review

JAVA Programming Questions & Answers

  Modify the inventory program by adding a button to the gui

If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user clicks on the Next button, the first item should display. Add a company logo to the GUI using Java ..

  Write a simple program that uses the class

Write a simple program that uses the class. It should prompt the user to input a string, display it, call one or the other of the class functions to convert it, then display the converted string.

  Chat facility using java

Develop an intranet based email server with user registration, user login, inbox, compose mail and chat facility using java, JSP, MS Access/MySQL, JDBC etc.

  Implement a third component of the compiler

To detect duplicate declarations using the same identifier, you call the method retrieveOneLevel. This method returns a pointer to the identifier entry if the identifier was declared before in the current scope and null otherwise.

  Why does the program end abnormally

Using the Person and PersonRunner classes below, execute the main method in PersonRunner. Why does the program end abnormally?

  Add a button that will read the text fields

Create a GUI with two text fields for inputting the dimensions of a rectangle. Identify these two text fields as Length and Width with labels. Add a button that will read the text fields and cause the GUI to display the area and perimeter of the r..

  Create an array to hold four account objects

Write Mybank class in Mybank.java. Create an array to hold four Account objects. For each account, randomly set the balance in the range of $0-$1000.00; print out the balance of each account

  Method called wordlengths that accepts a scanner

Write a method called wordLengths that accepts a Scanner representing an input file as its argument. Your method should read from the given file.

  Teaching software componentization

Describe one way in which one could apply Java graphics in education. Provide one example of such use to support your response and analyze at least three commands that you would use in order to draw a bar chart. Provide a rationale for your respons..

  How to open web pages in java as a string

How to open Web pages in Java as a string? Open a given Web page as its source file.

  Recommend at least five factors which programmers must

propose at least five factors that programmers should consider when choosing between data types such as those used in c

  Demonstrate the use of array or arraylist

It will calculate the additional amount of sales that each salesperson must achieve to match or exceed the higher of the two earners. The application should ask for the name of each salesperson being compared.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd