Category : Java
java
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Welcome to All Test Answers
java
You will be writing a class called MyInformationSystem that uses an array list and an inner class called Pair. Both MyInformationSystem and Pair are generic. Copy and paste the main method from below into MyInformationSystem in order to test your ...
Continue readingYou will create a GUI application that allows a user to move and resize a rectangle on the screen. The rectangle is initially red. If the user drags the top or left side of ...
Continue readingyou will make a basic postfix calculator. This calculator should reside in a class called Calculator, which extends JFrame. To add listeners to buttons, you should use the anonymous class strategy we discussed in lecture. For this basic calculator, for the ...
Continue readingYou will design two interfaces Interface Sortable: The interface Sortable has a single method: lessThan, which accepts as a parameter another Sortable and returns a boolean. This method will provide a means of comparison between two objects of the same type, ...
Continue readingYou will need Name and MyDate, as well as Person and NewWorker classes. You will also define a class called Student and another called Household. the definitions of new classes, are provided below. Class Person: Person will be an abstract class. It ...
Continue readingyou will define two classes. The classes you will define are Person and NewWorker, where NewWorker is based on Worker. The descriptions of Person and NewWorker are provided below. Class Person: Person has two instance variables. The first is of type Name, ...
Continue readingYou will define a class that has a default constructor, a regular constructor, and a copy constructor. The class will also have toString, lessThan, and equals methods. Create a class called “MyDate”. The MyDate class must have integer instance variables ...
Continue readingyou will practice taking user input and performing string tokenization. You will also practice regular expressions. You will create two separate programs to perform these tasks, as outlined below. 1. Prompt the user to input a sentence. Take an input sentence ...
Continue readingyou are going to practice taking user input and displaying to the console, as well as solve an interesting little problem, as follows. Prompt the user to input an integer. The user will then input an integer. The program will then ...
Continue readingyou will make a generic queue class called GenericQueue. A queue is a data structure similar to a stack. However, a stack is last-in-first-out (LIFO) and a queue is first-in-first-out (FIFO). To elaborate, a stack is like a stack of ...
Continue readingYou will create a very basic but functional Tic-Tac-Toe game. The first move must draw an X, the next must draw an O, and so on. You must not be able to overwrite a position that is already filled on ...
Continue readingYou will make an application with a GUI that allows the user to display the students in a university, sort them (ascending or descending), and find the number of students attending the university from a given country. Class Sort: You will make ...
Continue readingyou are going to make several classes that take advantage of two interfaces: FeeCalculator and Sortable. You will use the Sortable interface defined in the lab, as well as the Sort, Student, and Assignment6Tester classes I have provided. You will ...
Continue readingyou are going to make abstract and concrete classes that complete a simple inventory system for a grocery store. You are going to create an abstract class called Food, and then three concrete subclasses called Fruit, Carbohydrate, and MeatFish. Fruit ...
Continue readingyou are going to create a single class called Manager, which will extend NewWorker, you will also need MyDate, Name, NewWorker, Person, and TestManager . Manager is defined below. Manager: The manager class has only two instance variables. The first is ...
Continue readingyou are going to create two classes. The first class is called Name, which will be defined as below. The second class will be called TestWorker, which will also be defined below. TestWorker will give you practice calling a constructor. Definition ...
Continue readingyou are going to create a small programs. In writing this program, you will practice regex in Java. Prompt the user to enter a date in DD/MM/YY or DD-MM-YY format. Once the user inputs something and hits enter, check to see ...
Continue readingyou are going to create a programs. you will practice string tokenization in Java. 1. Prompt the user to input a set of grades, each separated by any amount of white space and a single semicolon, with the enter key to ...
Continue readingYou are going to familiarize yourself with Java and a popular Java development environment, Eclipse. You will create a simple program that solves an interesting little problem, and the problem is as follows.
Continue reading