Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need someone to show me how to code this. I separated this part from the second half so there's literally no reason for this

I need someone to show me how to code this.

I separated this part from the second half so there's literally no reason for this to be ignored this time.

image text in transcribedimage text in transcribedimage text in transcribed
This project includes many of the concepts we have learned: objectoriented programming, inheritance, exception handling, and using existing classes such as String, ArrayList, and File. Tip: All. of the concepts and classes needed in this project have example programs in the class hook and in the slides that allow you to quickly nd out how these classes can be used. For example, the File class is prmented in Chapter 12. Trainer. java Write a program 'I'rainer.java that allows you to import a question bank in form of a text le and to train to answer the questions in the question hank correctly. Emctionalityi Part 1 Once started the trainer displays a question. The user needs to answer it and hit enter. The program gives feedback if the answer is correct or not. Each question is displayed once, the order is random and changes when repeated. When all the questions have been displayed once, the program tells the user how many questions have been asked and how many have been answered oorreotly. Implementation: Part 1 Follow the steps below for your implementation: o The question bank is a text file that follows the format in the example question bank QuestionBanl-r.txt. You can assume that this format is correctly followed. o Create a class called \"Entry". Each entry of your question bani: will he an object of type Entry. o Entry should have the following data elds: q for the question. a for the answer. further fields that you can determine, and appropriate methods. It should furthermore have a constructor that takm two Strings as parameters: q and a (question and answer). :- Overwrite the toStringU method of Entry to print out the question and answer of the entry. Q: How do you call a general binary relationship that describes an activity between two classes? A: association Q: What do you use to match, replace, or split strings by specifying a pattern? A: a regular expression Q: True or false (T/F)? An abstract class can be used as a data type. A: T Q: When the return type of a method is an array, it actually returns? : a reference to the array Q: What is the keyword for declaring an exception? : throws your class. . Use the File and Scanner classes to read your file. Test if it works by reading and printing each line of your file. Make sure to use a local path, so that your program will work on other machines as well. Test it by moving your java file and question bank into a different folder. . Parse your question bank and create an array of Entry objects as necessary using the ArrayList class. . With all the main components in place, implement the functionality of your trainer as described in the Functionality section above. . Use exception handling where necessary. . Create methods or further classes as appropriate. . Your program still needs to work if questions are added to or deleted from the question bank

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Planning for integrated marketing communications

Answered: 1 week ago