Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part-1 (Objects and Classes) Create a Java Project (with a class and a test class) to represent some real-world entity such as a technology item
Part-1 (Objects and Classes) Create a Java Project (with a class and a test class) to represent some real-world entity such as a technology item (TV, Fan etc), an animal, a person, a vehicle, etc. In our class, we have already seen example classes such as Circle, Student, Rectangle, TV etc. The class will: a) Create a total of 5 member variables for the class by selecting the appropriate data types for each field. For example, a class to represent a lamp might include color, price, height, numBulbs, batteryOperated. Each of these 5 variables needs a data type. b) Include at least three different constructor methods, including the default constructor (no argument constructor), so totally three constructors. c) Create a method called showValues() to display the values of an object in a formatted manner. The Java test class (with a main method) will: a) Instantiate at least three objects (using each of the constructors at least once) with your program. b) Store the data from the individual objects into an array. c) Utilize the showValues() method to display the content of an object created. Note: 1) Draw the UML diagram for the class and then implement the class. Draw object diagrams wherever possible to show the state of the objects created 2) Generate output samples demonstrating all of your member functions showing their functionality (i.e. inputting values, outputting values (displaying them), performing calculations, etc.). Include the below in your project report: 1. The UML diagram of the class. 2. The class and test class 3. Screenshots of output generated from the application. ITDR2104 - Programming Fall 2020 Part-2 (Encapsulation, Inheritance, Polymorphism) Create a Java project that demonstrates various object oriented concepts you have learned so far in this course (encapsulation, inheritance and polymorphism). To do this, create a super class and at least 2 subclasses. You can either do multilevel inheritance or hierarchical inheritance in this to complete this part-2 task. The super class will have following properties/functionalities: a) Create a total of 3 member variables for the class, selecting the appropriate data types for each field. b) Include an argument constructor in this Class, that will initialize all data fields. c) Encapsulate this Class. The two subclasses will have below properties/functionalities: a) One of the subclasses will have at least one member variable and other subclass with at least two member es. b) Have two constructors in each subclass: One constructor for initializing only super class data Another constructor will initialize both super and subclass data. c) Encapsulate the subclasses. d) You should include overloaded methods in any of the classes you have created (superclass or subclass). e) Override the toString() method in each of your Classes. f) Override the equals() method in each of your Classes. The test class (with the main () method] will perform below tasks: a) Create objects of superclass and each subclass types invoking all constructors and Draw the object diagram for each of the object created. b) Use setter methods to fill missing data in all objects. c) Generate outputs demonstrating overloading, overriding outputs. d) Create object of subclass [actual type) and store it in superclass object [declared type]. e) Generate output for instanceof operator. f) Do object casting (show both implicit and explicit) g) Generate output for constructor chaining (using this and super keywords] Note: 1) Draw object diagrams wherever possible and necessary to show the state of the objects created Include the below in your project report: . The UML diagram of all Classes. Screenshots of all output generated from the application. Part - 3 (Abstract Class and Interface) Consider the Class that you designed in Part-1 of this project and do the following: 1. Implement the Comparable and Cloneable interface for your class. 2. The Test class should create 10 instances (objects) of your class. 3. Store these instances in Array and ArrayList. 4. Show the demo of sorting these objects stored in Array and ArrayList. Include the below in your project report: The code of implementing Comparable and Cloneable Interfaces. Screenshot of relevant (Comparable and Cloneable) outputs. . Part-4: Java FX Create a JavaFx project that demonstrates various topics you have learnt like, creating structure of JavaFx, Panes, UI Controls, Shapes and events-driven programming for different controls. To do this, use the classes from Part-2. Create a window that consists of the following: Window title: "Title of your project. Design your window by using different User Interface Control like Text Field, Labels, Checkbox / Radio button, Combo box, List box, etc.... Use the data fields from the part-2, to design the nodes of the window. (Minimum five different user interface controls should be used. Use the concept of the Events Driven Programming (EDP) in order to activate the following GUI components (Buttons, radio buttons, check box, etc..) to activate the events to some nodes in your window to implement actions. (Minimum three different events should be created) Include the below in your project report: Screenshots of all output generated from the application. Code for all classes
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started