Programming Fundamentals Project Project 1: Vehicle Simulator INTRODUCTION Your knowledge on Java Syntax is already good...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Programming Fundamentals Project Project 1: Vehicle Simulator INTRODUCTION Your knowledge on Java Syntax is already good enough to create a small universe. This universe is full of different types of vehicles on the field. Outside of the field is a cliff. Any vehicle that went outside of the field is dead. The field is divided into 4 different quadrants. ● In the beginning of the application, vehicles must be randomly populated on one of those quadrants. While the simulation will last for a certain number of turns, vehicles will move slightly each turn depending on its type. When the simulation ends, it will display the location of each vehicle, list of dead vehicles and which quadrant they are/were in. ● OBJECTIVES The main objectives of this project are to: ● ● 2 3 1 ● ● Interpret specifications and analysis performed Design a solution based on the requirements and specifications Design the logic required for functional solution Translate design documents and algorithms into source code Use debugging tools, and error-handling techniques Validate the solution with test data TIME REQUIRED You will require 30 hours to complete this project. These hours include 5 in-class sessions plus homework time to complete the application Integrate the knowledge acquired thus far Use the features of Eclipse IDE Demonstrate the use of the Java programming language. Apply the various program flow constructs. REQUIRED MATERIAL You will need the following material to complete this project: Eclipse 2019-06 Java SE 8 Development Kit (JDK) SPECIFICATIONS This simulation is all about the architecture and functionality not the appearance. Providing GUI is a bonus. This application requires you to use specific polymorphism structure, composition, inheritance. Certain methods will require you to use exception handling. When the application starts, the console will prompt the user to input following values: Length of each quadrants. Number of vehicles. Number of each vehicle type. When the specifications are done, program initialized the field and populate the vehicles (Car, Truck, SportsCar, Tractor) of random types in a random position in random quadrants. Coordinate of the center of the field is always (0, 0), each quadrant is always a right triangle and length of each quadrants are all same. All vehicles move in their own pattern each turn. Details will be specified later. ● OOP Java Knowledge ● When all the vehicles are dead, User should be able to see top 3 vehicles of each kind that lasted the longest and the details of those vehicles. KEY FUNCTIONS The main functions of the simulator may be summarized as follows: Use Prompt Input Simulation / Display each turn Display Results at the end ● DETAILED GUIDELINE/REQUIREMENTS Following is a guideline to implement the simulator. Object-Oriented design has to be implemented as follows due to the objective of this course. Vehicle abstract class Superclass for all vehicles. Properties: X coordinate (int), Y coordinate (int), alive (Boolean) Constructor to initialize all properties. Move Method: a) Called for all alive vehicles each turn b) Increments or decrements either x or y coordinates by 1. Any type of vehicle should throw an exception if the move method is invoked even when the vehicle is dead. Programming Fundamentals Project Project 1: Vehicle Simulator INTRODUCTION Your knowledge on Java Syntax is already good enough to create a small universe. This universe is full of different types of vehicles on the field. Outside of the field is a cliff. Any vehicle that went outside of the field is dead. The field is divided into 4 different quadrants. ● In the beginning of the application, vehicles must be randomly populated on one of those quadrants. While the simulation will last for a certain number of turns, vehicles will move slightly each turn depending on its type. When the simulation ends, it will display the location of each vehicle, list of dead vehicles and which quadrant they are/were in. ● OBJECTIVES The main objectives of this project are to: ● ● 2 3 1 ● ● Interpret specifications and analysis performed Design a solution based on the requirements and specifications Design the logic required for functional solution Translate design documents and algorithms into source code Use debugging tools, and error-handling techniques Validate the solution with test data TIME REQUIRED You will require 30 hours to complete this project. These hours include 5 in-class sessions plus homework time to complete the application Integrate the knowledge acquired thus far Use the features of Eclipse IDE Demonstrate the use of the Java programming language. Apply the various program flow constructs. REQUIRED MATERIAL You will need the following material to complete this project: Eclipse 2019-06 Java SE 8 Development Kit (JDK) SPECIFICATIONS This simulation is all about the architecture and functionality not the appearance. Providing GUI is a bonus. This application requires you to use specific polymorphism structure, composition, inheritance. Certain methods will require you to use exception handling. When the application starts, the console will prompt the user to input following values: Length of each quadrants. Number of vehicles. Number of each vehicle type. When the specifications are done, program initialized the field and populate the vehicles (Car, Truck, SportsCar, Tractor) of random types in a random position in random quadrants. Coordinate of the center of the field is always (0, 0), each quadrant is always a right triangle and length of each quadrants are all same. All vehicles move in their own pattern each turn. Details will be specified later. ● OOP Java Knowledge ● When all the vehicles are dead, User should be able to see top 3 vehicles of each kind that lasted the longest and the details of those vehicles. KEY FUNCTIONS The main functions of the simulator may be summarized as follows: Use Prompt Input Simulation / Display each turn Display Results at the end ● DETAILED GUIDELINE/REQUIREMENTS Following is a guideline to implement the simulator. Object-Oriented design has to be implemented as follows due to the objective of this course. Vehicle abstract class Superclass for all vehicles. Properties: X coordinate (int), Y coordinate (int), alive (Boolean) Constructor to initialize all properties. Move Method: a) Called for all alive vehicles each turn b) Increments or decrements either x or y coordinates by 1. Any type of vehicle should throw an exception if the move method is invoked even when the vehicle is dead.
Expert Answer:
Answer rating: 100% (QA)
Code import javautilScanner abstract class Vehicle int xCoordinate int yCoordinate boolean alive Vehicleint x int y boolean alive xCoordinatex yCoordinatey thisalivealive public abstract void move pub... View the full answer
Related Book For
Business and Administrative Communication
ISBN: 978-0073403182
10th edition
Authors: Kitty o. locker, Donna s. kienzler
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
1. Based on the information provided in the case below, what is the key strategic goal for Tim Hortons as of August 2014? It would be a year of dramatic change for Tim Hortons Inc. On August 26,...
-
The Apache NetBeans IDE is mainly composed of NetBeans Open-Source IDE and NetBeans Platform. (True/False)
-
Lopata, Hamm, Volker, and Sowinski (2007) studied the general motor and visual skills of children with a neurological developmental disorder. They gave 17 children with the disorder (n = 17) the...
-
EC Construction Ltd. (EC) has 100,000 common shares outstanding in public hands. The balance of retained earnings at the beginning of 20X7 was $2,400,000. On 15 December 20X7 EC declared dividends of...
-
What is the expectations gap?
-
Sierra Company manufactures woven blankets and accounts for product costs using process costing. The following information is available regarding its May inventories. The following additional...
-
What is JDBC ? Explain the role of Driver in JDBC. What is the purpose Class.forName method ? What is the advantage of PreparedStatement over Statement ? What is the use of CallableStatement ? Name...
-
The expected return for country fund X is 10 percent with a standard deviation of 25 percent and the expected return for country fund Y is 30 percent with a standard deviation of 40 percent What...
-
1.The self-employment tax rate in US 2020 is ? 2.The maximum a 35-year-old self-employed taxpayer can contribute to his SEP is the lesser of __________ or 20% of self-employment net profit minus...
-
From 2005 to 2021, Randy worked for KY-Tech Inc. As part of his compensation package, in 2017 KY-Tech Inc. offered Randy the opportunity to purchase up to 1000 shares of KY-Tech Inc. common stock for...
-
A stock has a return of 12.9 percent and a beta of 1.27. The market return is 12.6 percent and the risk-free rate is 4.13 percent. What's the Jensen alpha of this stock?
-
"time value of money." Please provide three (3) specific examples of ways in which the time value of money impacts either specific strategic tax/financial planning decisions we have discussed or...
-
Stu is opening up a new computer service store. During November and December of 2022, he paid $20,000 in rent, $20,000 in advertising, and $20,000 in consulting. The doors to the company will open on...
-
The adjusted trial balance for Impressions Dance School has been provided for the year ended September 30, 2020. The new bookkeeper alphabetized the accounts. Account Debit Credit Accounts payable $...
-
Identify the source of funds within Micro Credit? How does this differ from traditional sources of financing? What internal and external governance mechanisms are in place in Micro Credit?
-
What are some ways to deal with the common fear of public speaking? Which ways would work for you?
-
Revise the following memo to improve positive tone. TO: All Staff SUBJECT: Decorating Your Work Area with the arrival of the holiday season, employees who wish to decorate their work areas should do...
-
What are the advantages of receiving an overseas assignment?
-
A candlestick chart is similar to a bar chart except that the candlestick chart: A. Represents upward movements in price with Xs. B. Also graphically shows the range of the periods highs and lows. C....
-
What considerations might encourage a market analyst to rely more on a top-down or bottom-up forecast of S&P 500 operating earnings?
-
Which of the following advantages listed by Ryan with respect to the earnings-based approach studied by Atkinson is most likely correct? The model A. Can be used for non-U.S. equity markets. B....
Study smarter with the SolutionInn App