Giter VIP home page Giter VIP logo

project-csce314's Introduction

Phase 2 is due Wednesday the 24th at 11:59pm.

Coding:
Use Refactor -> Move to move the Muscle and the Equipment enumerations to the Config class, which is where they should have been from the beginning. 

Take what you learned writing the loadWorkouts() method and write a loadFormats() group. It should read a file defined in Config.WORKOUTFORMATFILE as a CSV file and return an enumeration hashmap.

Set Workout inner class to public and use the Refactor option to extract the workout class to a new file, so the class is now its own file. This reflects a design change in the future use of the software.

Add these methods to the Workout class. They should function just like the hasEquipment equivalent.
protected boolean hasPrimaryMuscle(ArrayList<Config.Muscle> muscleList) 
protected boolean hasSecondaryMuscle(ArrayList<Config.Muscle> muscleList).

Add these methods to the Workouts class. 
public final Workouts getWorkoutsByMuscle(ArrayList<Config.Muscle> m, boolean includeSecondary)
This should function just like the getWorkoutsByEquipment equivalent.
public final ArrayList<String> getEquipment()
This should function just like the getNames equivalent.
public final int size()
This should return the number of workouts in the class.
public final Workout getWorkout(int index)
This should return an instance of the workout class that matches the index in the workoutList.
public final String getWorkoutEquipment(int index)
This should return the equipment of the workout at the given index.
public final int findWorkoutByName(String name)
This searches through the list of workouts in the class and returns the index of the workout with that name.

You have a new javaFit.java file. It loads the two data files and creates a new window. This is the bulk of the assignment: Create a Swing class that creates and displays three full-size buttons in a 600x400 window and then add ActionListeners to them that call a function to display the appropriate workout groups.

The WorkoutsPanel.java class is provided for you.

You will want to make sure you get the new workouts.csv file from github so you have a larger selection of test data. 

What You Turn In:
1) The completed .java files.

Grading: 
Grading will be based upon completeness. If your code is fully functional and passes all tests while adhering to the design guidelines, you get full points for this section. If your code is partially functional, you will get partial credit. If your code does not compile or run, you will get minimal credit. If you turn nothing in, you will get no credit.

Academic Honesty: As with most programming project, student code will be subjected to extensive anti-cheating monitoring. Algorithm design will be checked, as well as code layout. 

project-csce314's People

Contributors

jonathanlabrum avatar glen-tamu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.