The Alset Corporation wants to begin marketing electric vehicles (EVs)

 

The Alset Corporation wants to begin marketing electric vehicles (EVs) to customers in the nation of Climatonia. Because the company is brand new, models and options are very limited. The user can only select from one of three types of models, and the only available option is an extra charging cable. Your job is to write a program in Java that will allow employees to see the configurations that are currently available for purchase.

Alset EVs come in three types:
Type 1: Rear wheel drive, small battery pack (short range)
Type 2: Rear wheel drive, medium battery pack (medium range)
Type 3: All wheel drive, large battery pack (long range)

All cars feature four doors and come with a charging cable. Type 1 vehicles are painted green and have no other options. Type 2 vehicles are painted blue and have GPS navigation. Type 3 vehicles are painted red, have GPS navigation, and also have a sunroof.

After meeting with the client, the design team determined the following custom class requirements for this program:

A class called Alset with the following:

  • A property called numDoors (integer) with a value of 4
  • A property called chargeCable (integer) with a value of 1
  • A property called paintColor (String) with a value of Green
  • A property called freeCharge (String) with a value of No
  • A method called displayInfo() that prints each of these properties on screen like this example: “Number of doors: 4”

A class called Type1 with the following:

  • Inherits from Alset class
  • This model does not have any additional features

A class called Type2 with the following:

  • Inherits from Alset class
  • A String property called gpsNav with a value of Yes
  • A method that overrides displayInfo(), adding a line to report the gpsNav property

A class called Type3 with the following:

  • Inherits from Alset class
  • A String property called gpsNav with a value of Yes
  • A String property called sunroof with a value of Yes
  • A method that overrides displayInfo(), adding lines to report the gpsNav and sunroof properties

When the program runs, present the user with a simple explanation of the program (one sentence), followed by a menu that asks them to enter 1 for Type 1, 2 for Type 2, or 3 for Type 3. Use the Scanner class to process input and use IF/ELSE statements to handle their choice. Once the choice has been made, instantiate a member of the appropriate class, set the correct paint color (if type 2 or 3), then execute the displayInfo() method to display the properties of the vehicle on-screen. Once the information has been displayed, the program should end.

Write code comments in both the project class and each of the custom classes to document your program. In your custom classes, use JavaDoc comments to document the features of the class.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Examine and analyze issues of power, ethics, communication, and

While Assignment 1 focused on your individual behavior in the context of the human service organization, Assignment 2 focuses on the culture of the human service organization. In this paper you will discuss your present or former organization’s culture (your organization hereafter). Again, the intention is to explore the human

In this unit, we learned about three of the world’s

In this unit, we learned about three of the world’s earliest civilizations: Egypt, Mesopotamia, and China. For this assignment, you will compare and contrast two of these civilizations. Instructions: • Research the two civilizations that you did not describe in this week’s Discussion Board. • First, discuss why you think

Describe a professional situation that you have experienced or a

Describe a professional situation that you have experienced or a case that you have read about, where some type of unethical behavior was observed by others. Detail the actions of the observer i.e., did they report the behavior, acquiesce or adopt the same negative behavior. Was the unethical behavior actually

Capital Budgeting and Financial Analysis- 450 words Review at least

  Capital Budgeting and Financial Analysis- 450 words Review at least 2 academically reviewed articles on capital budgeting and 2 articles on financial analysis and complete the following: A. Write an annotated bibliography of each article. B. Based on the articles you reviewed, discuss what you learned C. In addition,

Question: Discuss which study design is used when both Nursing Assignment Help

Question: Discuss which study design is used when both researchers and participants know to which group the subjects were assigned, meaning they know what treatment is being received by the subjects.Discussion Requirements: You must make a minimum of four substantive contributions on two separate days of the learning week to the discussion topic. Post

Conflict Resolution Program

In this assignment, you will integrate the concepts of conflict resolution, group influence, and attribution to develop a program of conflict resolution to a current conflict situation. Identify a conflict between two groups, and obtain approval from your instructor. Write a 700- 825-word paper in which you create a program

M3D1: Invisible Wounds of War

 . M3D1: Invisible Wounds of War Module 3 Module 2 dealt with the consequences of war to the health of civilians. In Module 3, we learned the effects of war on soldiers and the health concerns they bring home with them. As part of our first activity we will discuss

Read the following case study about John to establish a

Read the following case study about John to establish a diagnostic formulation of the client. The assignment questions follow the case information. John grew up in the Midwest with his mother Dana and his father Ed. His father was a cargo pilot who would often be away from the home

A mother comes to the pediatric clinic for a health

  A mother comes to the pediatric clinic for a health maintenance visit for her children: an 18-month-old daughter, a 2 1/2-year-old daughter, and 4-year-old son. The small family appears clean but the clothes appear well-worn. The mother appears nervous and apologizes about their appearance, explaining things have been tough

Antibiotics have saved millions of lives since they were first

  Antibiotics have saved millions of lives since they were first observed by Pasteur and Koch and later named by Selman Waksman in 1942. Unfortunately, antibiotic-resistant microbial strains are becoming more prevalent and therefore making once easily treated infections more difficult to treat. For your initial discussion post, share your

Select five positive characteristics and five characteristics that need improvement

Select five positive characteristics and five characteristics that need improvement in your professional behaviors and practice. Use nursing leadership theory, leadership theory, and change theory discuss how these characteristics developed, how you intend to maximize the positive and what you will do with those needing improvement. Include short and long

Marketing Strategy Online stores use

Marketing Strategy Online stores use <a href=” codes</a> as a powerful marketing tool. They attract new customers and encourage repeat business by offering discounts. These codes can help clear out old inventory and introduce new products. Customer Loyalty Coupon codes are a way to build customer loyalty. Shoppers are more

For this assignment you are required to write on TWO

For this assignment you are required to write on TWO topics and only ONE topic can be chosen from a particular week. In short, a complete Gobbet Exercise should look something like this: Primary source 1 (Course Reader: Module Week 1 – option A) 500-800 wordsPrimary Source 2 (Course Reader: Module

What is a professional learning community and mentor new teacher

What is a professional learning community and mentor new teacher program? What are the benefits and challenges to having a professional learning community and mentoring a new teacher program in an educational setting? Which one would benefit you more in your first year of teaching? The candidate will complete 3

GMU Volunteers Excel Sheet Questions Nursing Assignment Help

Expert Solution Preview Introduction: As a medical professor, my role is to create assignments and evaluate the performance of medical college students. Through lectures, examinations, and assignments, I aim to provide comprehensive education and feedback to these students. In this particular scenario, I will provide an appropriate answer to the

Write a 1,050- to 1,400-word paper about genetically vigorous populations.

  Write a 1,050- to 1,400-word paper about genetically vigorous populations. Include the following items: Genetic Diversity: Explain the importance of genetic diversity and how genetic diversity in plants and animals supports long-term viability, biodiversity, and biotic integrity. Describe specific examples of at least one plant population and at least one animal

M9 Discussion This module’s discussion is about Software Engineering &

  M9 Discussion This module’s discussion is about Software Engineering & ethics. Read the two attached articles SE ethics in Digital world.pdf Download SE ethics in Digital world.pdfand Professional and ethical dilemmas in SE.pdf Download Professional and ethical dilemmas in SE.pdf. Post a message of at least 100 words in