Giter Site home page Giter Site logo

physicsexercise's Introduction

CS4421-ISE

Welcome to the GitHub repository for the CS4421-2022 cohort (ISE) at the University of Limerick! Here you will find all the exercises and content regarding CS4421. You are free to submit PR's to improve the content.

Exercise Instructions

So for this exercise, we wil be looking at a physics problem and using what we've learned so far to implement a solution to the below problem.

Problem space

  • A bicyclist goes up a hill at 30 km/hr and comes back down the same hill at 90 km/hr.
  • You are to find and output the average speed for this trip.
    • Note: It will not be 60 km/hr
  • Also calculate and output the cyclist's average speed if they go up the hill at 20 km/hr and down the hill at 100 km/hr.

Before writing any code, you should make sure that you understand the problem on paper before trying to then put that into code.

This project will require you to work with doubles(decimal numbers) in java rather than using integers. To make whole numbers work as doubles, you should write them as 1.0, 3.0 instead of just 1, 3. Example below

    int integer = 123;
    double wholeNumberAsDouble = 123.0;

Expected Output

For this exercise, we will be autograding it so you will need to have your print outs in a specific format which can be found below.

Expected output format

"For a bicycle going up the hill at X speed and down the hill at Y speed, the average speed is : AverageSpeed km/hr"

Example output(Answer is not correct)

For a bicycle going up the hill at 30 speed and down the hill at 90 speed, the average speed is : 45 km/hr

You should do this for both the scenarios in the problem space and print them out to the console. There is no requirement to in take the speeds but instead, you should put these parameters above into variables for them to be used.

Primary Authors

Acknowledgements

  • Prof. Tiziana Margaria Full professor and Co-Director of Immersive Software Engineering [1] at University of Limerick

References

[1] https://www.software-engineering.ie/

physicsexercise's People

Contributors

adamd115114 avatar

Watchers

James Cloos avatar  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.