create a text based user interface class called WorkOutUI Create tow fields that will be accessible through the whole class A static constant field called ABBA to store the string "Agnetha#Benny#Bjorn#annafrid". A static field called an integer called totalPoints. Code a method Called processWorkOuts.The method must accept the name of the member of Abba whose text file must be processed.This method must be called from the main method. In the processWorkOuts Method: Display the name of the Abba Group whose file is being processed. add ".txt" to the file name sent as a parameter. instantiate a WorkOut object called workOut Using the constructor:+constructor(p:real, n:interger) ,send 0 for an initial points value and 0 as the initial numWorkOuts value. Open the text file and loop through the file extracting the start ,end,description and level fields from the file.Display an error message if the file cannot open. a) Instantiate a workout object using the constructor:+Constructor (s:string,e:string,d:string,i:integer) b) call the changeDescription method in the WorkOut class c) Display the WorkOut object using the toString method. call the getStars method and assign to a variable called stars. call the getPoints method and assign to the field totalPoints call the getNumWorkOuts method and assign to a variable called numWorkOuts. Display the stars,totalpoints and numWorkOuts followed by two blank lines.use the format shown below. Stars 15 Number of Workouts 21 Total points earned 108.4

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a java programme

  1. create a text based user interface class called WorkOutUI
  2. Create tow fields that will be accessible through the whole class
    1. A static constant field called ABBA to store the string "Agnetha#Benny#Bjorn#annafrid".

    2. A static field called an integer called totalPoints.

  3. Code a method Called processWorkOuts.The method must accept the name of the member of Abba whose text file must be processed.This method must be called from the main method.
  4. In the processWorkOuts Method:
    1. Display the name of the Abba Group whose file is being processed.
    2. add ".txt" to the file name sent as a parameter.
    3. instantiate a WorkOut object called workOut Using the constructor:+constructor(p:real, n:interger) ,send 0 for an initial points value and 0 as the initial numWorkOuts value.
    4. Open the text file and loop through the file extracting the start ,end,description and level fields from the file.Display an error message if the file cannot open. a) Instantiate a workout object using the constructor:+Constructor (s:string,e:string,d:string,i:integer) b) call the changeDescription method in the WorkOut class c) Display the WorkOut object using the toString method.
    5. call the getStars method and assign to a variable called stars.
    6. call the getPoints method and assign to the field totalPoints
    7. call the getNumWorkOuts method and assign to a variable called numWorkOuts.
    8. Display the stars,totalpoints and numWorkOuts followed by two blank lines.use the format shown below.
        • Stars 15
        • Number of Workouts 21
        • Total points earned 108.4

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Study of Characters
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education