Create a basic menu-driven program

Assignment Help Other Subject
Reference no: EM132550955

Exam 1

Introduction
You'll apply the concepts of Lesson 3 to create a basic menu-driven program.

Instructions
You'll create both pseudocode and a flowchart to design an application that displays the following menu:
Select a Planet
1. Mercury
2. Venus
3. Earth
4. Mars
5. Exit the program

Enter your selection.
When the user selects a planet from the menu, the program should display the following information about the planet:

Mercury

Average distance from the sun

57.9 million kilometers

Mass

3.31 × 10^23kg

Surface temperature

-173 to 430 degrees Celsius

Venus

Average distance from the sun

108.2 million kilometers

Mass

4.87 × 10^24kg

Surface temperature

472 degrees Celsius

Earth

Average distance from the sun

149.6 million kilometers

Mass

5.967 × 10^24kg

Surface temperature

-50 to 50 degrees Celsius

Mars

Average distance from the sun

227.9 million kilometers

Mass

0.6424 × 10^24kg

Surface temperature

-140 to 20 degrees Celsius

Review Appendices B and C in your textbook for guidance when working on your project. Use free trials of any of the programs listed in CSC105 Graded Project 1 to create the flowchart. Write your pseudocode in a plain-text editor such as Notepad or TextEdit and save as a text file (*.txt). Also, save a screenshot of your flowchart as a JPEG file (*.jpg).

Exam 2

Introduction
You'll apply the concepts of Lesson 4 to design a class as well as a program that creates an object and calls methods.

Instructions

Part 1: Design a Class
You'll design a class named Car that has the following fields:
• yearModel-An Integer that holds the car's year model
• make-A String that holds the make of the car
• speed-An Integer that holds the car's current speed
The class should have the following constructor and other methods:
• The constructor should accept the car's year, model, and make as arguments. These values should be assigned to the object's yearModel and make fields. The constructor should also assign 0 to the speed field.
• Design appropriate accessor methods to get the values stored in an object's yearModel, make, and speed fields.
• The accelerate method should add 5 to the speed field each time it's called.
• The brake method should subtract 5 from the speed field each time it's called.
Create your class in a plain-text editor such as Notepad or TextEdit and save as a text file (*.txt).

Part 2: Design a Program
You'll create both pseudocode and a flowchart to design a program that creates a Car object and then calls the accelerate method five times.

Review Appendices B and C in your textbook for guidance when working on your project. Use free trials of any of the programs listed in CSC105 Graded Project 1 to create the flowchart. Write your pseudocode in a plain-text editor such as Notepad or TextEdit and save as a text file (*.txt). Also, save a screenshot of your flowchart as a JPEG file (*.jpg).

After each call to the accelerate method, get the current speed of the car and display it. Take a screenshot of the results after your fifth time calling the method, and save it as a JPEG file (*.jpg).

Then, call the brake method five times. After each call to the brake method, get the current speed of the car and display it. Take a screenshot of the results after your fifth time calling the method, and save it as a JPEG file (*.jpg).

Attachment:- menu-driven program.zip

Reference no: EM132550955

Questions Cloud

Discuss three important sources of economic growth : Discuss three important sources of economic growth for any small and vulnerable economy. How do these countries
Compute depreciation expense for the year ending December : Assuming Paul's Lodging Corporation uses straight-line depreciation, compute depreciation expense for the year ending December 31, 20X9
Draw a graph and a commentary : Draw a graph and a commentary to explain the effects on income, interest rate, consumption and tax revenue.
Find what number of these products should purchase : Find what number of these products should it purchase from GenAdd in order to fill the customer demand at the lowest possible cost?
Create a basic menu-driven program : Create a basic menu-driven program - create both pseudocode and a flowchart to design an application that displays
Analyze the impact of healthcare financing : Analyze the impact of healthcare financing and health insurance on healthcare access, quality, and cost. Determine the factors that affect healthcare quality.
Explain how the price that canadian consumers pay : Before 1995, trade between Canada and Mexico was subject to tariffs.In 1995, Mexico joined NAFTA and all Canadian
What are the annual ordering costs : What are the annual ordering costs? Adrian Accessories requires 2500 tablets per year. Kimberley, the managing director has decides to order 50 tablets
What kind of macroeconomic policy should canada follow : Should it be fiscal policy, monetary policy or supply-side policies according to its economic conditions?

Reviews

Write a Review

Other Subject Questions & Answers

  Words weathering and erosion are synonyms

The words weathering and erosion are synonyms; they can be used interchangeably. Graywacke and conglomerate are examples of well-sorted rocks; shales and fine-grained sandstone are examples of poorly sorted rocks.

  Describe the physical consequence of the clinical issue

Develop a PowerPoint presentation of 15-18 slides, addressing clinical issues in the elderly and neglect and abuse of dependent adults and the elderly.

  How does bundling payments contain healthcare costs

How does bundling payments contain healthcare costs? How do value-based purchasing (VBP) programs affect reimbursement to hospitals?

  Write about the dubai expo 2020

The difficulty obviously is that it hasn't happened yet, so there's no scholarly material on it, mostly promotional material. You'll have to look closely.

  Is everything material

Is everything material? How is it that science can only account for some 93% of the matter in the universe? Why is there anything at all?

  Analyze selected theories of teaching adult learners

Analyze selected theories of teaching adult learners. Apply approaches to promoting diversity and inclusion to adult education and lifelong learning.

  How can you involve the parents and community resources

Give three examples of appropriate stimulation (activities) you can employ in the classroom or daycare center to promote learning.

  What type of anemia does ms a most likely have

Ms. A. is an apparently healthy 26-year-old white woman. Since the beginning of the current golf season, Ms. A has noted increased shortness of breath.

  Describe the pros and cons of shock incarceration

Describe the pros and cons of shock incarceration. The use of boot camps (shock incarceration) is more frequently administered as a court sanction for adults.

  Describe key campaign strategies that a u.s presidential use

Describe key campaign strategies that a U.S. presidential candidate can use in order to ascend to presidency in today's political environment. Then, compare at least two such successful strategies that were used in the past by U.S. presidential ca..

  Practice of psychology and psychological research

What do you believe are the most significant ways in which federal laws govern the practice of psychology and psychological research? Why?

  Discuss strategies that law enforcement officers can use

This week, you will read "The Case for Procedural Justice: Fairness as a Crime Prevention Tool." This article discusses strategies that law enforcement.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd