CST2110 Object Oriented Programming Assignment

Assignment Help JAVA Programming
Reference no: EM132479419

CST2110 Object Oriented Programming - Middlesex University

Accordingly, when loaded into NetBeans, each Part must be a separate project.

Part 1

Create a NetBeans 8 project for this Part, named Part1.

You are required to write a Java 8 program that opens and reads a delimited data file that is located relative to the NetBeans project root folder. The delimited data file contains fictional information about trading companies in North London. The data file is called traders.txt. The data file should not be altered and should be considered as a read-only data file.

Within the ‘traders' data file, there are 25 lines each representing a single trading company. On each line there are six data fields representing the following information (in order): company name, location (in North London), the services offered by the company, the number of employees, a daily rate (pounds), and a general description of the trading company.

You are required to implement a Java class to represent a trading company. The program should parse the data file, create an object for each trading company, and store all the objects into a suitable collection.

Figure 3 provides a UML class representation of the class that you will need to implement. It indicates the six data members (denoted as private data), a series of public accessor (i.e., getter) methods that map to the data members, a single public constructor, and a toString() method.

Once all the objects are loaded into the collection, the program should present the User with a console- based menu to interact with the data set. This menu should loop until the User enters a character to exit the menu (e.g., zero as illustrated below). In addition to an exit option, the menu should offer four other options: list all traders, select a single trader, search on company location, and search for listed services.

On starting the program, the following menu should be displayed to the console:

List traders. 1
Select trader. 2
Search locations. 3
Search services. 4
Exit. 0

Enter choice:>

The User can simply exit the program by entering zero. The four other menu options allow the User to inspect the information in the data set (note again that this program is entirely read-only and there is no requirement to add, update or delete any part of the data set). The necessary interaction of the program with respect to these four options is illustrated in Appendix A.

Note that console output should be neatly formatted, and some consideration will be given to formatting when the program is assessed. In particular, when the option to view a single trade company details is selected, it should result in the invocation of the toString() method for that particular Trader object. You are encouraged to explore and utilise a StringBuilder object when implementing the toString() method for the Trader class.

Part 2

Create a new NetBeans project, called Part2.

For this Part you are required to write a Java 8 program that incorporates a series of classes that represent the core logic of an application and provides a NetBeans 8 console user interface. The required Java application relates to a proposed software system to manage some aspects of a gymnastics competition. Below is an initial description of the system domain with a few very simple use cases (i.e., just simple, natural language statements).

System domain

A gymnastics club holds an annual competition that includes events for both male and female gymnasts. For male gymnasts, there are six available events: Floor Exercise, Pommel Horse, Still Rings, Vault, Parallel Bars, and High Bar. For female gymnasts there are four possible events: Vault, Uneven Bars, Balance Beam, and Floor Exercise. Each gymnastics event has a specified start time and there is, for each event, a limit of 10 on the number of competitors who can compete in that event.

Each gymnastics event is organised by one or two club committee members, with each committee member organising at least one gymnastics event. Each competitor is allocated a unique competitor's number. Both male and female gymnasts may compete in a minimum of two events and a maximum of four events.

When competing in an event, the competitor is awarded a score that is calculated with respect to the difficulty level of the competitor's chosen routine. Each competitor is allowed only one attempt at a selected event, apart from the Vault for which there are two attempts. The two attempts at the Vault must be different routines.

Use cases

1. List Event Information. The user of the software system identifies a gymnastics event. If the event is either the Vault or Floor Exercise, then the user also identifies if it is a male or female event. In response, the system displays the number and name of every competitor in that event, along with the name of the Committee Member(s) that are organising that event.

2. List Competitor Events. The user of the software system identifies a competitor. In response, the system displays a list of all events that the competitor is entered in, and for each of those entered events, the system lists the routine description and difficulty rating for the attempt at that event.

3. List Event's Attempts. The user of the software system identifies a gymnastics event. If the event is either the Vault or Floor Exercise, then the user also identifies if it is a male or female event. In response, the system displays details of all attempts that have been completed for that event, including the name of the competitor, the routine description and difficulty rating, and the score that was achieved by the competitor for that attempt at the event if the attempt has already been completed.

Your Part is to design a Java 8 program for the gymnastics event management system described above, which provides a console-based (text I/O) user interface that facilitates the three listed use cases. An initial analysis of the domain has already been partially completed, and a partial class model has been designed as shown in Figure 4.

Your application should include Java classes for the above classes as a minimum, but you should bear in mind that the above illustration is only a partial model. You are not required to submit any UML for this Part. The partial class diagram above is provided as a design guide for your Java implementation.
In order to operate with the console-based User interface, your application will require some ‘dummy' data to be pre-coded into the application. This should be achieved by ‘hard-coding' data within the Java program. It should not use any data layer component or SQL database link. There is no requirement to ‘write' any data for the Part. All pre-coded data should be read-only.

Part 3

Create a new NetBeans project

For this Part you are required to program a JavaFX Graphical User Interface (GUI), with a focus on layout and event handling.
This program must be coded as a JavaFX program following the approach described in Chapters 14 to 16 of the kortext. It must not be created using a visual drag-and-drop tool, and must not be an FXML program, neither of which have been taught on the module. If the submission is either a drag-and-drop application, or a FXML application, then it will simply be awarded zero marks.

The GUI application that you need to create is a basic ‘smart home controller' application.

The application comprises three areas representing controls for lighting, central heating and CCTV. Each area on screen comprises JavaFX nodes and controls. The lighting area comprises Labels, Sliders and Circle objects. The central heating area comprises a Label, RadioButtons, a Slider and a TextField. The CCTV area comprises a Label, four ImageViews and four associated ToggleButtons.

a) Write a JavaFX program that replicates (accurately) the GUI layout The focus should be entirely on accuracy of layout, and there are no marks for styling using CSS. The illustration shown in Figure 5 is the default look and feel of JavaFX in Windows NetBeans 8 and that is all that is expected of your program.

b) Implement event handling for the GUI as follows:

• For the lighting area, the colour of each Circle object should change in response to the associated horizontal slider being dragged. When the Slider is dragged to the left the colour should ‘darken', and when dragged to the right, the colour should ‘lighten'.

• For the central heating area, the RadioButtons should operate correctly in that only one RadioButton can be selected at a time (i.e., they are mutually exclusive in terms of selection). The Slider must be vertical and when dragged up or down the value in the TextField must be updated to reflect the value on the Slider.

• For the CCTV area, each of the four ImageViews should be mapped to one of the four ToggleButtons. Clicking on any of the four ToggleButtons should result in the associated image being ‘blacked out' (clicking again would reveal the image again).

Viva Voce Assessment

Please note carefully that his assignment is an individual assessment.

Following submission and marking of assignments, and as part of the module assessment moderation procedure, a cross-section of students will be required to attend a follow up viva voce assessment with the teaching team. These appointments will be arranged after first phase (provisional) marking has been completed.

Note: All figures are attached

Attachment:- Programming Assignment.rar

Reference no: EM132479419

Questions Cloud

Write briefing report on client tax obligations : Write briefing report on client tax obligations, Review the information provided to you for the client and conduct research to confirm up-to-date taxation
What would be your choice of nursing care delivery models : As the manager for your unit, what would be your choice of nursing care delivery models? Give at least three (3) advantages and three (3) disadvantages.
Compute the cost assigned to ending inventory : Determine and Compute the cost assigned to ending inventory using (a) FIFO, (b) LIFO, (c) weighted average, and (d) specific identification.
What advice you give to a friend coping with a weight issue : What can be done in your own community to turn the obesity trend around? What kind of program might you create in this effort to bring health back to our.
CST2110 Object Oriented Programming Assignment : CST2110 Object Oriented Programming Assignment help and solution, Middlesex University - assessment writing service - Create a NetBeans project
How does ideal contribute to harmony with heaven : What is wuwei? How does this ideal contribute to harmony with heaven? How does the Daoist idea of wuwei compare to Confucian notions of how one should live.
What experience with the umuc career quest account system : Explain how our course, ACCT 221 Principles of Accounting II, also known as managerial accounting, relates to your academic and career goals.
What can apns do collectively to address the barriers : As nurse practitioners and certified nurse midwives fight to achieve primary care provider (PCP) status, what laws, regulations, and policies should every.
Why do think sybil over-produced inventory : Now the company has 4,000 units in inventory and runs the risk of them being stolen or becoming obsolete. Why do you think Sybil over-produced inventory?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Determine whether the five-digit input was odd or even

inputs one number consisting of five digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Why the program only print the last book 4x

why the program only print the last book 4X - Problem with line 08 - Problem with line 27

  Write a class named daysofmonth

Determine whether the year is divisible by 100. If it is, then it is a leap year if and if only it is divisible by 400. For example, 2000 is a leap year

  Provide two reasons why internet has a problemistic future

How will the Internet impact the future of politics and businesses practices?

  Implement avl trees that allows both iterative traversal

implement avl trees that allows both iterative traversal and recursive traversal.iterative traversal is fairly easy if

  Declare and create a jpanel named panelfunctsys

Declare and create a JPanel named panelFunctSys. Use the BorderLayout layout manager. Add panelFunctButton to the CENTER region. Add panelSysButton to the SOUTH region.

  Interface named comparison

Create an interface named Comparison whose method can be used to compare two Time object. The Method will include isGreater,isLess,and is Equal.

  You have to create a world class that contains a 2d array

you have to create a world class that contains a 2d array then create an abstract class called organism that contains

  Discuss the use of arrays in java programs

Discussion Question: Discuss the use of arrays in Java programs versus the use of regular variables

  Create a fortune teller app

For this fifth Critical Thinking Assignment you will create a fortune teller app. The app will require that the user ask a question then shake the phone.

  Calculates the total at the end

Make a program that asks the user how much change they have and then calculates the total at the end.

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