Hi guys,
I am doing a Java project. For now it's just a program but this program is to be used through the semester. I have hard time thinking what class to work. We need to create a class of anything like cheese, cars, rectangle etc that we will be using again and again.I was thinking of Cell Phone but not sure if it would be okay for future programs. If you have some time please see the details of the Project. I need to make only 1 class.

My ideas so far:
Cell Phone( Apple,Samsung .. so many to choose)

Recommend any ideas . Thanks

For this semester, you will be doing a number of labs and projects using the same class over and over again. You’ll be using it for labs/projects like a linked list of objects, stack of objects, queue of objects, tree of objects. Some of the projects will be like maintaining a database of objects where you will interact with the user to add, update, and delete from the database.
Instead of you being forced to do a specific class, you can create your own class as long as it isn’t a Rectangle, Cube, Car, Coin, or Circle (or Butt)
The class you create must have at least 2 attributes, you need at least 1 constructor that will receive at least 1 parameter, you need setters and getters for each of the fields where applicable *remember how the Car class had a getSpeed() but didn’t have a setSpeed() - it had brake() and accelerate() ]
If you can’t think of a good class and are lost as to what to do, here is an example:
Cheese class with attributes a String of cheeseType and a double of cheesePrice. The constructor would receive parameters newCheeseType and newCheesePrice. The methods would be getCheeseType(), getCheesePrice(), setCheeseType(), setCheesePrice()
Project Details
For this review project, you are to create a Class of your own choosing (other than Rectangle / Cube / Car / Coin / Circle / Butt) and use that class
You are to:
 prompt the user for the attributes (Scanner or JOptionPane)
 create the object in memory using the user’s input
 Display the attributes from the object using the getters.
A Sample Run (using Cheese class):
Enter the type of cheese: Cheddar
Enter the price of the cheese: 1.99
Cheese type: Cheddar
Cheese price: 1.99
Press any key to continue . . .

You could try doing something practical like:

- A banking system
- A grid navigation system
- An employee HR system
- A game like pacman, battleships, connect 4

These are good ways where you are going to get a lot of interaction with the user, however for most things you will need more than 1 class.

This article has been dead for over six months. Start a new discussion instead.