分配答案 [英] Answer to assignment

查看:88
本文介绍了分配答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

5) 程序1

假设您有N个鸡蛋,然后将它们包装成12个纸箱.编写确定多少个鸡蛋纸箱的程序
您需要多少剩余的鸡蛋.

输出的格式应如下:

鸡蛋总数为___
所需纸箱数量为___
剩余的鸡蛋数为___

在N = 11和N = 37的情况下运行程序.

程序2

保险公司将根据以下规则调整汽车保险单的金额:

如果客户未满25岁且在过去一年中没有提出索赔,则其保单不会增加
价格.如果他们未满25岁,并且在过去一年中有过任何索偿要求,他们的保单
价格增加了$ 100.如果他们年满25岁,并且在过去一年中没有提出索赔,则没有
增加其政策价格.如果他们年满25岁,并且有任何索赔要求,则其保单价格为
增加了$ 50.​​

编写一个程序来确定保单价格上涨的金额.
使用可变的年龄"作为年龄,使用可变的numClaims作为索赔数量.
您的输出应采用以下格式:

年龄= ___索赔= ___保单增加= ___

确保运行足够的数据组合以确保程序正确运行.

请提交.java源代码文件和屏幕截图.

5) Program 1

Assume you have N eggs and you pack them 12 to a carton. Write a program that determines how many egg cartons
you need and how many eggs will be left over.

The output should be formatted as follows:

Total number of eggs is ___
Number of cartons needed is ___
Number of eggs left over is ___

Run your program for N = 11 and N = 37.

Program 2

An insurance company will adjust the amount of automobile insurance policies according to the following rules:

If a customer is under the age of 25 and has had no claims in the past year, there is no increase to their policy
price. If they are under the age of 25 and they have had any claims in the past year, their policy
price is increased by $100. If they are 25 or older and have had no claims in the past year, there is no
increase to their policy price. If they are 25 or older and have had any claims, their policy price is
increased by $50.

Write a program that will determine the amount of policy price increases.
Use a variable ''age'' for the age and a variable numClaims for the number of claims.
Your output should be formatted as follows:

Age = ___ Claims = ___ Policy Increase = ___

Make sure you run enough combinations of data to ensure that your program works correctly.

Please submit .java source code files and screen captures.

推荐答案

100.如果他们年满25岁,并且在过去一年中没有提出索赔,则没有
增加其政策价格.如果他们年满25岁,并且有任何索赔要求,则其保单价格为
增加了
100. If they are 25 or older and have had no claims in the past year, there is no
increase to their policy price. If they are 25 or older and have had any claims, their policy price is
increased by


50.

编写一个程序来确定保单价格上涨的金额.
使用可变的年龄"作为年龄,使用可变的numClaims作为索赔数量.
您的输出应采用以下格式:

年龄= ___索赔= ___保单增加= ___

确保运行足够的数据组合以确保程序正确运行.

请提交.java源代码文件和屏幕截图.
50.

Write a program that will determine the amount of policy price increases.
Use a variable ''age'' for the age and a variable numClaims for the number of claims.
Your output should be formatted as follows:

Age = ___ Claims = ___ Policy Increase = ___

Make sure you run enough combinations of data to ensure that your program works correctly.

Please submit .java source code files and screen captures.


发布为解决方案,可将其从未答复的列表中删除,这是一个答案.
请提交.java源代码文件和屏幕截图." ... 不,谢谢.我在学校的时候做作业.我觉得不需要为您做.
Posted as a solution to removed this from the unanswered list and it is an answer, of sorts.
"Please submit .java source code files and screen captures." ... no thanks. I did my homework when I was in school. I do not feel a need to do yours for you.


这篇关于分配答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆