• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help with an assignment please

 
Ranch Hand
Posts: 33
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A program to create a class that contains a method that accepts compass directions and displays the same. You need to ensure that the method must accept any one of the directions: NORTH, SOUTH, EAST, WEST, NORTHEAST, SOUTHEAST, SOUTHWEST or NORTHWEST.
 
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, Nilesh.

Folks here are eager to be helpful, but they won't just do the assignment for you, nor does anyone just assume you want them to do it for you. Instead, what works well here is if you post the code you have so far, and then ask for help in getting it to do what you want. Usually, people will give you suggestions and examples that will, in the end, let you solve your problem and complete your assignment yourself.

So, give it a try and post your first attempt at writing this program. Then we'll see what we can do.
 
Ranch Hand
Posts: 99
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to do your assigment step by step, you start coding and search on the web if you got stuck in some part of your code, to see how it works.

Regards,
-M
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nilesh, welcome to the Ranch.

This sounds like a task where an enum type would be exactly what you would want to use. Please give it a go and if you get stuck, show us how far you've got and we'll explain things.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic