Java代写 | PA1 | CS代写

北美Summer school,暑校CS代写。总所周之,暑校的CS课程一般为introduce系列的入门基础课程,最近北美暑假季,主要以basic的语言通识课为主。本次作业的使用NetBeans通过Java GUI开发简单的runner计算器,在2小时内轻松搞定并完成售后答疑。

PA1: Creating the Structure of a Class

Important Dates and Information

See Blackboard Calendar for due dates.

Grade yourself with the Grading Checklist, below, and submit it along with your programming assignment.   This helps me to maximize your partial credit.

Assignment

Write the structure for two programs, each with two classes (.java files).

The first program…

  • Create a Java main class called CalculatorRunner.
    • Find the public static void main method.
    • Insert a line to print out the phrase “In calculator main” to standard output.
    • Add a method named promptUser()

Hints for Calculator Runner:

    1.  Start NetBeans
    2. Choose File-New Project
    3. Choose General – Java Application, and then click on the Next button.
    4. The Name and Location dialog box appears.
      • Name the project “calculator” (without the quotes).
      • In the Project Location folder, choose the directory on your computer where you would like to save your project.
      • Under Create Main Class, leave the checkbox checked, and change the name after “calculator.” To “CalculatorRunner” (without quotes.  In other words, instead of the default “calculator.Main”, it should be “calculator.CalculatorRunner”.
  • Add one method: public static void promptUser().

 

    1. Choose Finish.
    2. The syntax for printing to standard output is System.out.println(“text to print to output”);
  • Create a Java class called Account.
    • Add one method: public void calculate().
    • Add three instance fields (attributes): balance, rate, and periods. Choose the most appropriate data type.
    • Add getter and setter methods for each of these attributes.

 

Hints for Account:

    1. Right click on the package named ‘calculator’ on the left side of the NetBeans screen.
    2. Choose New-Java Class
    3. Enter the name Account.
    4. Choose finish.
    5. Add the methods within the class block (between the very first { and very last } ), but not within another method block. Caution: be very careful to match up the open and close curly braces.  There should be one { for every }, and they MUST be in the proper place!
    6. Add the instance fields/attributes.  Be sure to declare these where we declare attributes – within the class block {}, but not within a method block {}.

The second program…
This program mimics the first program.  In the first program, I provided step – by – step instructions.  In this program, I’d like you to reapply those instructions on your own.

  • Create a new project, named converter.
  • Create a main class in that project, named ConverterRunner.
    • In the main method, enter a line to print “In converter main”.
    • Add a static method named promptUser()
  • Create a second class, named Converter.  This does not need to be a main class.
    • It should have one instance field named fahrenheit.
    • It should have a getter and setter method for fahrenheit.
    • Create an attribute and getter and setter method for celsius,
  • In PA2, we will place calculations in these getters and setters to convert Celsius to Fahrenheit and Fahrenheit to Celsius. We will remove the attribute celsius in PA2, but we need it in our project now so that we can compile.

Please submit all of the following to the Assignments tab in NetBeans.  Compress ALL of the following items into one zip file and submit it.

  • This completed grade sheet.
  • Both NetBeans projects. It will probably be easiest to zip each project separately, and then place both projects into the large file that you will submit.
  • Complete the grading sheet below. Enter the number of points you believe you have earned out of 10.  Give yourself more than five if you put forth some effort.  Give yourself five points if you did not attempt the item.  If you assign more than five points, but you did not attempt the item, I will change the grade to 0 points.

程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: [email protected]  微信:dmxyzl003 工作时间:全年无休-早上8点到凌晨3点


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

发表评论