11/19/24, 7:21 PM Mega Store | Java | TestDome
Mega Store
Java SE 21
Copy to IDE Show starting code
1 ▾ public class MegaStore {
2
3▾ public enum DiscountType {
4 Standard,
5 Seasonal,
6 Weight;
7 }
8
9 public static double getDiscountedPrice(double
10 double
11 ▾ Discou
12 ▾ switch (discountType) {
13 case Standard:
14 return totalPrice * 0.94; // 6%
Run
Output Tests: 4 pass / 0 fail
Compilation OK
All test cases pass, great!
82.0
Your score is 100%, perfect!
https://www.testdome.com/questions/java/mega-store/126358 1/4
11/19/24, 7:21 PM Mega Store | Java | TestDome
Tags
AI-resistant Java Arithmetic Conditional Statements Enum
Video New Public Easy
Information
Difficulty: Easy
Duration: 10 min
Score Distribution
Not enough data for chart.
Would you like to see our other questions?
We have 1000+ premium hand-crafted questions for 160+
job skills and 20+ coding languages. We prefer questions
with small samples of actual work over academic
problems or brain teasers.
Visit the Question Library
https://www.testdome.com/questions/java/mega-store/126358 2/4
11/19/24, 7:21 PM Mega Store | Java | TestDome
Would you like to see our tests?
The following tests contain Java related
questions:
Android and Java
Java
Java Hibernate
Java Spring
Java Spring Boot
On the blog
Screening Applicants: The Good, the Bad and
the Ugly
Since we're all biased and we use incorrect proxies, why
not just outsource hiring to experts or recruitment
agencies? After all, they've been screening people for
many years, so they must know how to do it right?
Not really. I was surprised to discover that many experts...
Read full article
https://www.testdome.com/questions/java/mega-store/126358 3/4
11/19/24, 7:21 PM Mega Store | Java | TestDome
Product Assessments
Screening Library
Interviews
Certificates
Use Cases
Customers
ROI Calculator
Integrations
Pricing
Resources
Book: Evidence-Based Hiring
Blog
Support
Contact Us
Legal
Follow us
Sitemap Back to top
https://www.testdome.com/questions/java/mega-store/126358 4/4