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
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?
|