Reference no: EM132412680
Algorithms and Data Structures - Practical Programming Assignment
Introduction - You are to develop objects for a computer system. This assignment is divided up into separate parts to help you with your development.
Part A -
Using Eclipse you should create a new System project.
Within the project, create a Systemxxxxx class, where your exam ID forms part of the class name - for example System_xxxx, where xxxx is your exam ID.
Attached is the class diagram for the System class.
Within your project create another class called SystemTest_xxxxxx, (where xxxxxx is your exam id).
Create a 'main' method, which should create a Systemxxxxxx object and test all the methods.
You should 'set' the details within the code.
Compile and run the SystemTest class from the command line.
Evidence your source code and output in your assignment report.
Note - Your program should run from the command line i.e. independently of Eclipse.
Part B - System properties
As you know Java provides a System class with many useful static methods (e.g. System.out.println()).
One of the methods provided in the System class is getProperty(argument).
Add a 'displaySystemProperties()' method to your Systemxxxxx class. This method should display (in appropriate format) the following properties:
Operating System Architecture
Operating System Name
Operating System Version
User Account Name
Java Version.
The method should also output a positive message if the Operation System equals 'Windows 10', a negative message if the Operating System equals 'Linux' and a neutral message for the rest of the operating systems.
Test the displaySystemProperties() method by calling it from the test class you wrote in part A.
Part C - Test class with textual menu
Amend your test class so that, after it initialises a Systemxxxx object, it presents the user with the following textual menu in the console (use as many options as you have implemented).
Choice 1 - Print System Details
Choice 2 - Diagnose System
Choice 3 - Set Details
Choice 4 - Quit the program
This menu should be repeated until the user quits.
When Choice 3 is chosen, the memory size and hard disk size of the computer should be interactively set e.g. prompt to take in user input.
Part D - Upgrade to a GUI interface
Within your project create another class called SystemTestGUI_xxxxxx, (where xxxxxx is your exam id).
Create a 'main' method, which should create a Systemxxxxxx object and test all the methods.
Create a graphical menu based on the structure of your textual menu in Part C, providing appropriate user interaction for input and output.
You should explore the range of GUI components available to you. This may be a simple series of screens using JOptionPane (Figure 1) or a hierarchical navigation structure with appropriate layouts (Figure 2. Advanced GUI with multiple screens and elements.). Note: these figures are only provided as examples, your design does not need to match them.
Make sure you carefully consider what type of data (information) you want the user to input and that your selected components support this (consider the data types in the class diagram).
Credit will be given for appropriateness, diversity (hierarchical navigation, choice of components where applicable) and clarity of arrangement (intuitive interface, clear indication of input required, concise display of output).
Attachment:- Algorithms and Data Structures - Practical Programming Assignment File.rar