filmov
tv
[SOLVED] Individual Programming Assignment #1 (RESIT)

Показать описание
Get your Assignment Solved:
Task 1 (20 %)
Your task is to write a Java 8 program (as a NetBeans 8 project) that opens the data file, parses the text of the film script, and prints the following information to the console:
a) The total number of uppercase letters in the file.
b) The total number of lowercase letters in the file.
c) A listing of the frequency of each letter in the file (uppercase or lowercase), ordered by the highest frequency to the lowest frequency. The listing should display each letter, followed by the letter’s frequency (integer count). There should be a new line between each letter and frequency value.
The frequency counts should be performed on letters only (i.e., not on non-letter characters).
Task 2 (40%)
Task 3 (40%)
This programming task has a focus on object-oriented concepts that are introduced in Chapter 9 of the module kortext.
Consider the finite state machine (FSM) that is illustrated in Figures 5a, 5b and 5c,
The FSM illustrated above represents a ‘cross-trainer’ exercise machine typically found in a gym. The FSM essentially represents the set of states that the cross-trainer can be in, with transitions resulting from events produced by interaction with a touchscreen.
Your task is to write a Java 8 program (as a NetBeans 8 project) that is a simulation of the cross-trainer. In other words, the program must (on execution) demonstrate the FSM illustrated in Figures 5a, 5b and 5c. As part of this program, you are required to design and implement (as a minimum) a dedicated Java class that represents the cross-trainer. As with all other tasks in this assignment, User interaction must be text-based at the NetBeans console (i.e., not a GUI), and, in this case, it should offer a simple menu-selection interaction using mutually exclusive integer values (i.e., each menu option maps to a different integer value to be read in at the prompt)
The menu interaction must support all state transition events depicted in the FSM and allow the User to exit the program. The console interaction should operate as follows:
• On entry to the home state, the console should display default programme setting values for target distance, a target time duration, a resistance level, and the default fan speed setting should be ‘off’. The User should be presented with options (via a menu on the NetBeans console) to transition from the home state to one of four modes (states) in which the exercise programme settings can be changed: fan speed, BPM, preset programmes, and manual programme.
• When the User enters the fan speed state, they should be allowed to increase or decrease between four mutually exclusive fan speed settings: off, slow, medium, and fast. On completing the selection
8 of the fan speed setting, the User should have an option to return to the home state whereby the updated fan setting is reflected in the home state display (i.e., printed to the NetBeans console).