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

  Class named person with fields for holding a person''s name

Design a class named Person with fields for holding a person's name, address, and telephone number. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields.

  Object oriented programming-getting started with classes

Suppose you are car shopping and want to store information about possible choices. Model, and implement an automobile class. Use a UML drawing tool such as Umbrello or Microsoft Visio to create a class diagram. Your class should have at least cons..

  Create a controller class that implements an fcfs schedule

Create a controller class that implements an FCFS schedule and instantiates 5 objects of each class and runs each object - write to the system out a number of times.

  Program that allows the user to enter an unknown number

Writer a program that allows the user to enter an unknown number of characters, stores those characters in a data structure (a vector) and then prints the values to the screen.

  Java program simulate a network

Java program simulate a network

  Prepare a java application will read the database file

Prepare a java application will read the database file. The path of the database file will be supplied by a run-time parameter. If the database file does not exist, the user will be told the database does not exist.

  Write an enhanced for loop

Write an enhanced for loop that counts how many numbers in an ArrayList object named list are negative. Print the count after the loop terminates

  Java programming arrays

Write a Java application program that takes in user input from keyboard and calculate semester grade based on the scores. In this assignment, you are going to rewrite the program, instead of taking keyboard input, you will use dialog box to prompt..

  Create at least two vectors and demonstrate the use of each

Create a separate class, VectorTest, that will demonstrate the use of your Vector class. You must create at least two vectors, and demonstrate the use of each method. When you demonstrate the use of each method, print the results to the console ..

  Price and quantity of an article

XYZ Supermarket wants a program that will prompt for the product code, pricing code, price and quantity of an article. Your program is then to calculate a discount rate according to the pricing code.

  Integer expression evaluator

You must implement a bounded generic Stack class. Represent your Stack using an array to hold the stack content - Integer Expression Evaluator

  Create your program using eclipse

Create your program using Eclipse. Name your project Assignment5 and the Java class Loops. Use the Scanner class to get input from the user and use System.out to print to the console window.

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