Question
-Could you please write this project in java programming: You will write a program to keep up with a Gas station and some of the
-Could you please write this project in java programming:
You will write a program to keep up with a Gas station and some of the available items (The Gas station can be real or not) using Object-Oriented Programming (OOP). The important aspect of object-oriented programming is modular development and testing of reusable software modules.
-You have a head for money and programming and have decided to open a gas station. To save money you will write your own program to keep up with your items and store. You will need the five classes discussed below.
1- You will have an Items class, with class attributes of an item name, a description, and a cost. Make sure these variables are safe (inaccessible from outside of this class) ** about the description: The description should be about what the Item is, size, and/or relevant info.
2-A Test_Item class, that is a Junit test class for the Item class. This should contain at least 7 test methods that tests the methods in the Item class.
3-You will need a GasStation class, with class attributes of your Stores name, an Array (default size of 10) of Items sold at the GasStation, and a counter to keep track of how many items are in the array.
4-A Test_GasStation class, that is a Junit test class for the GasStation class. This should contain at least 6 test methods that tests the methods of the GasStation class.
5-Your DriverP1 has a class attribute of a GasStation (there should be no variable for an Item object in this class). All the data for the GasStation and Items are to be hard coded (Do Not ask the user for that data).
Your DriverP1 has a class attribute of a GasStation (there should be no variable for an Item object in this class). All the data for the GasStation and Items are to be hard coded (Do Not ask the user for that data).
-Your program will need to:
- Include the programming standards found in Blackboard.
- The Junit tests for the two classes should pass.
- The hardcoded data for the GasStation and Items classes should be in the DriverP1 and passed to the appropriate methods of the other classes.
- Print a welcoming message
-Print the name of your GasStation and all the Items (you must have at least 5 different kinds of Items for the GasStation), including the Item name, description, and cost (be sure to have different costs, dont make them all $3.00 or something dumb like that)
Calculate and print the average cost of Items sold at the GasStation. Be sure that this average cost looks like a normal monetary amount (i.e.: $5.00 and not $5.00425)
- Print a Good-Bye message or Thank you for shopping.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started