is it possible that instead of using the while loop to make it go back to step 1 is it possible to use the switch case
Type: Posts; User: clive nys
is it possible that instead of using the while loop to make it go back to step 1 is it possible to use the switch case
im stuck with what the condition in the while loop, and is the statement that i have already ok or does it need tweeks
im still stuck with the loop. pls help
Scanner input = new Scanner(System.in);
int carNumber = 0;
int daysNumber = 0;
since im currently stuck in step 2 where if the number is higher than 4 you bring them back to step 1
ok then, how do you add the loop case using the if statement
i thought that you will write the step for me like you said in #26
nvm it, lets ignore it for now since i want to ask my teacher about it more spesifically. so how is the coding/?
before i want to edit the list i want to ask which would be better for the coding filereader or writer since our teacher dint say which to use to use and said its our choise
so instead of stoping the code it would be better to do a loop,ok thats fine but ihave a question where do you add the file writer in the code
step 1 the program ask you "Enter the number of the car"
step 2 if the number is higher than 4 the program should "stop" while if its lower than 5 it should proceed to step 3
step 3 the program ask...
if the command for 2 is valid then it should stop after you typed like 5, btw each of the int have a value(1=400,2=500,3=600,4=700).
as for step 3, the program needs to read the users input then...
so like this?
promt user what number of the car to rent
if the num. of the car is greater than 4 "pls try again"
type the num of days you want to rent
give the total cost of (car rented price *...
what do you mean by program design steps
how exactly should i put it in the program? should i add to the if statement i have?
this is what ive done so far
Scanner input = new Scanner(System.in);
int carNumber = 0;
int daysNumber = 0;
...
should i put the if statement after the switch statement and should i use the if-then statement
ok now that i have done that,what do i need to do so that when i put 5 or more in the "number of car" it will say that " that is not a valid car, pls try again"
what do i need to do so that when i put 5 or more in the "number of car" it will say that " that is not a valid car, pls try again"
Scanner input = new Scanner(System.in);
int carNumber =...
where should i put the switch statement or between what line should i put it in
now im stuck with how to give each number (up to 4) a vaule like 1 = 500
import java.util.Scanner;
public class gg
{
public static void main(String[] args)
{
the thing that im confused with is what kind of data type should i use for "what kind of car to rent?
i have started and have finished with the " how many days to rent" but now im stuck with the "what kind of car to rent" and adding a value to each kind of car
so far this is what i have done and...
imm gonna try what you have said but im still wondering how to add either filewriter or reader to my program and which is the easiest to add
im sorry since i am just learning about java and all and may be confused with what you are asking
and so if im understanding this correctly then my questions are 1. what kind of method of the three...
i dont have any posted code or code tags since i dont know where to begin and the spesific questions about our project is
1.what kind of car you wanna rent
2.how much per day is the car
3.for how...