Angle Kuniyoshi

Greenhorn
+ Follow
since Sep 20, 2021
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
1
Total given
13
Given in last 30 days
12
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Angle Kuniyoshi

i fixed the indentions
are these classes ok?

1 week ago

Campbell Ritchie wrote:

Angle Kuniyoshi wrote:Can you check if this is ok. the format or placement of it?

No, it isn't.



Can you point out whats wrong with it?
1 week ago
Can you check if this is ok. the format or placement of it?



then below will be the main method and switch statement
1 week ago
is it okay of i use polymorphism
1 week ago
the uml diagram
Employee
-name:String
+ setName(): void
+ getName(): String

then both of these are pointing at the employee

FullTimeEmployee
- monthlySalary: double
+ setMonthlySalary(): void
+ getMonthlySalary(): double

PartTimeEmployee
- ratePerHour: double
- hoursWorked: int
- wage: double
+ setWage(): void
+ getWage(): double
1 week ago


are these correct. sorry im still exploring inheritance and interfaces since it was just taught today
1 week ago
They did actually that's why i said i forgot to do something.
ill post it later
1 week ago
but I only followed the uml diagram tho
1 week ago
Oh wait i forgot to do something
1 week ago
So here's the thing
there are 3 classes which is this one


and the main class will be the RunEmployee which i think will contain the switch statement


1 week ago
where should i put that here

3 weeks ago
sorry but what item class?
3 weeks ago
3 weeks ago
this is actually the activity. i dont know if i should post this or not but im just really desperate. im so sorry. please help me.

how do i code the void ones?

Exercise2  |
__________________________________________________|
- itemName: String  |
- itemPrice: double  |
- itemQuantity: int  |
- amountDue: double  |
__________________________________________________|
+ stetItemName(String newItemName): void  |
+ setTotalCost(int quantity, double price): void  |
+ getItemName(): String  |
+ getTotalCost(): double  |
+ readInput(): void  |
+ writeOutput(): void  |
__________________________________________________|

Note: The readinput() method will be used to accept user input through the Scanner class. This is
done by:
a. Writing import java.util.*; on top of the code, before the line for the class name
b. Instantiating an object of the Scanner class, Scanner s = new Scanner (System.in);
C. Storing the input to the variable name based on data type
For String: s.nextLine()
For int: s.nextInt()
For double: s.nextDouble()
The writeOutput() method will be used to display an output similar to the sample below.

You are purchasing 3 bag(s) at 1999.5 each.


Sample output:

Enter the name of the item you are purchasing.
bag
Enter the quantity and price separated by a space.
3 2000.50
You are purchasing 3 bag(s) at 2000.5 each.
Amount due is 6001.50
3 weeks ago
It doesnt because i dont know how to do it. im sorry
It says here that the writeOutput() should display this:
You are purchasing 3 shoes at 1999.50 each.
3 weeks ago