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

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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